var embed_player;(()=>{var __webpack_modules__={2389:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},8223:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>i})},8283:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},3510:(e,t,n)=>{"use strict";function r(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function i(e){return Math.min(1,Math.max(0,e))}function o(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?100*Number(e)+"%":e}function s(e){return 1===e.length?"0"+e:String(e)}function l(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=0,l=(i+o)/2;if(i===o)s=0,a=0;else{var u=i-o;switch(s=l>.5?u/(2-i-o):u/(i+o),i){case e:a=(t-n)/u+(t1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function c(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=i,l=i-o,u=0===i?0:l/i;if(i===o)a=0;else{switch(i){case e:a=(t-n)/l+(t_});var g={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function v(e){var t={r:0,g:0,b:0},n=1,i=null,s=null,l=null,c=!1,d=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(g[e])e=g[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=S.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=S.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=S.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=S.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=S.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=S.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=S.hex8.exec(e),n)return{r:m(n[1]),g:m(n[2]),b:m(n[3]),a:p(n[4]),format:t?"name":"hex8"};if(n=S.hex6.exec(e),n)return{r:m(n[1]),g:m(n[2]),b:m(n[3]),format:t?"name":"hex"};if(n=S.hex4.exec(e),n)return{r:m(n[1]+n[1]),g:m(n[2]+n[2]),b:m(n[3]+n[3]),a:p(n[4]+n[4]),format:t?"name":"hex8"};if(n=S.hex3.exec(e),n)return{r:m(n[1]+n[1]),g:m(n[2]+n[2]),b:m(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(A(e.r)&&A(e.g)&&A(e.b)?(t=function(e,t,n){return{r:255*r(e,255),g:255*r(t,255),b:255*r(n,255)}}(e.r,e.g,e.b),c=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):A(e.h)&&A(e.s)&&A(e.v)?(i=a(e.s),s=a(e.v),t=function(e,t,n){e=6*r(e,360),t=r(t,100),n=r(n,100);var i=Math.floor(e),o=e-i,a=n*(1-t),s=n*(1-o*t),l=n*(1-(1-o)*t),u=i%6;return{r:255*[n,s,a,a,l,n][u],g:255*[l,n,n,s,a,a][u],b:255*[a,a,l,n,n,s][u]}}(e.h,i,s),c=!0,d="hsv"):A(e.h)&&A(e.s)&&A(e.l)&&(i=a(e.s),l=a(e.l),t=function(e,t,n){var i,o,a;if(e=r(e,360),t=r(t,100),n=r(n,100),0===t)o=n,a=n,i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=u(l,s,e+1/3),o=u(l,s,e),a=u(l,s,e-1/3)}return{r:255*i,g:255*o,b:255*a}}(e.h,i,l),c=!0,d="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=o(n),{ok:c,format:e.format||d,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var y="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",b="[\\s|\\(]+("+y+")[,|\\s]+("+y+")[,|\\s]+("+y+")\\s*\\)?",E="[\\s|\\(]+("+y+")[,|\\s]+("+y+")[,|\\s]+("+y+")[,|\\s]+("+y+")\\s*\\)?",S={CSS_UNIT:new RegExp(y),rgb:new RegExp("rgb"+b),rgba:new RegExp("rgba"+E),hsl:new RegExp("hsl"+b),hsla:new RegExp("hsla"+E),hsv:new RegExp("hsv"+b),hsva:new RegExp("hsva"+E),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function A(e){return Boolean(S.CSS_UNIT.exec(String(e)))}var w=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var i=v(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=o(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=c(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=c(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this.roundA+")"},e.prototype.toHsl=function(){var e=l(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=l(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this.roundA+")"},e.prototype.toHex=function(e){return void 0===e&&(e=!1),d(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,i){var o=[s(Math.round(e).toString(16)),s(Math.round(t).toString(16)),s(Math.round(n).toString(16)),s(h(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb("+e+", "+t+", "+n+")":"rgba("+e+", "+t+", "+n+", "+this.roundA+")"},e.prototype.toPercentageRgb=function(){var e=function(e){return Math.round(100*r(e,255))+"%"};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*r(e,255))};return 1===this.a?"rgb("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%)":"rgba("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%, "+this.roundA+")"},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+d(this.r,this.g,this.b,!1),t=0,n=Object.entries(g);t=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=i(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=i(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=i(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=i(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a{"use strict";n.d(t,{Z:()=>r});const r=function(e){function t(e,r,l,u,h){for(var p,m,g,v,S,w=0,_=0,T=0,O=0,I=0,N=0,D=g=p=0,M=0,F=0,U=0,H=0,V=l.length,G=V-1,z="",X="",W="",Q="";Mp)&&(H=(z=z.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0{"use strict";n.d(t,{Z:()=>r});const r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},6126:(e,t,n)=>{"use strict";n.d(t,{r:()=>s});var r,i=n(2784);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:a,...s}=e;return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:12,height:12,ref:t,"aria-labelledby":a},s),n?i.createElement("title",{id:a},n):null,r||(r=i.createElement("path",{d:"m1.1.2-.9.9L5.1 6 .2 10.9l.9.9L6 6.9l4.9 4.9.9-.9L6.9 6l4.9-4.9-.9-.9L6 5.1z",fill:"currentColor",fillRule:"evenodd"})))},s=(0,i.forwardRef)(a);n.p},7024:(e,t,n)=>{"use strict";n.r(t);var r={};n.r(r),n.d(r,{Portal:()=>b,PortalWithState:()=>w});var i=n(2784),o=n.t(i,2),a=n(7029),s=n.t(a,2),l=n(8316),u=n(3980),c=n.n(u),d=!("undefined"==typeof window||!window.document||!window.document.createElement),h=function(){function e(e,t){for(var n=0;ni.useContext(O),x=e=>{const{connectedPortals:t}=I();(i.useInsertionEffect||i.useLayoutEffect)((()=>{e(t)}),[t])},C=(...e)=>(t,n,r,i,o)=>T(void 0,void 0,void 0,(function*(){let a=t;for(const t of e)a=yield t(a,n,r,i,o);return a})),k=(e,t)=>{let n;if(null===t.styles||Array.isArray(t.styles)&&0===t.styles.length)n=(e,t,n,r,i)=>e;else if(Array.isArray(t.styles)&&0!==t.styles.length&&"string"==typeof t.styles[0])r=t.styles,n=(e,t,n,o,a)=>{const s=r.join("\n"),l=document.createElement("style");return l.append(document.createTextNode(s)),a.append(l),t=>{const n=(0,i.useRef)(new Set);return x((e=>{e.forEach((e=>{n.current.has(e)||(n.current.add(e),e.stylesWrapper.append(l.cloneNode(!0)))}))})),i.createElement(e,Object.assign({},t))}};else{if("function"!=typeof t.styles)throw new Error("Incorrect value for `styles` was provided");n=t.styles}var r;return{component:e,name:t.name||e.displayName||e.name,stylesInjector:n}};var R,L=new Uint8Array(16);function N(){if(!R&&!(R="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return R(L)}const P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const D=function(e){return"string"==typeof e&&P.test(e)};for(var B=[],M=0;M<256;++M)B.push((M+256).toString(16).substr(1));const F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase();if(!D(n))throw TypeError("Stringified UUID is invalid");return n};const U=function(e,t,n){var r=(e=e||{}).random||(e.rng||N)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return F(r)},H=(e,t,n)=>T(void 0,void 0,void 0,(function*(){let r=Object.assign({},t);return new Promise((t=>{l.render(i.createElement(e,Object.assign({},r)),n,(()=>{const o={updateProps:t=>new Promise((o=>{r=Object.assign(Object.assign({},r),t),l.render(i.createElement(e,Object.assign({},r)),n,(()=>{o()}))})),unmount:()=>new Promise((e=>{l.unmountComponentAtNode(n),e()}))};t(o)}))}))})),V=(e,t,n={})=>T(void 0,void 0,void 0,(function*(){const{includeCssReset:r=!0,mountStrategy:o=H}=n,a=U(),s=n.shadowHost||document.createElement("div");n.shadowHost||(s.id=a);const l=s.attachShadow({mode:n.useClosedShadow?"closed":"open"}),u=document.createElement("div"),c=document.createElement("div");u.classList.add("inject-react-anywhere-mounted-into"),l.appendChild(u),l.appendChild(c);const d={current:[]};if(r){const e=document.createElement("style");e.innerHTML=".inject-react-anywhere-mounted-into, .inject-react-anywhere-mounted-into::before, .inject-react-anywhere-mounted-into::after {all: initial;}",c.appendChild(e)}const h=yield e.stylesInjector(e.component,s,l,u,c);yield new Promise((e=>setTimeout(e,0)));const p=Object.assign(Object.assign({},t),{connectedPortals:d.current}),m=yield o((e=>{var{connectedPortals:t}=e,n=_(e,["connectedPortals"]);return i.createElement(O.Provider,{value:{insideShadowDom:!0,shadowHost:s,shadowRoot:l,mountedInto:u,stylesWrapper:c,unmountRoot:()=>{m.unmount()},connectedPortals:t}},i.createElement(h,Object.assign({},n)))}),p,u);return Object.assign({id:a,shadowHost:s,shadowRoot:l,mountedInto:u,stylesWrapper:c,mirrorStylesInto:e=>{((e,t)=>{let n;t?(n=t,n.innerHTML=e.innerHTML,[...e.attributes].forEach((e=>{n.setAttribute(e.nodeName,e.nodeValue)}))):n=e.cloneNode(!0);const r=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&t.target===e&&n.setAttribute(t.attributeName,e.getAttribute(t.attributeName))})),n.innerHTML=e.innerHTML}));r.observe(e,{subtree:!0,attributes:!0,characterData:!0,childList:!0})})(c,e)},connectPortal:e=>{d.current.includes(e)||(d.current=[...d.current,e],m.updateProps({connectedPortals:d.current}))}},m)}));var G=n(8298);const z=class DefaultGroupedTag{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n=this.groupSizes.length){const t=this.groupSizes,n=t.length;let r=n;for(;e>=r;)if(r<<=1,r<0)throw new Error(`Styled components error with code: 16, arg: ${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let o=r;o{const t=document.head,r=e||t,i=document.createElement("style"),o=(e=>{const t=Array.from(e.querySelectorAll(`style[${X}]`));return t[t.length-1]})(r),a=void 0!==o?o.nextSibling:null;i.setAttribute(X,"active");const s=n.nc;return s&&i.setAttribute("nonce",s),r.insertBefore(i,a),i},Q=class CSSOMTag{constructor(e){this.elements=(e||[void 0]).map((e=>W(e))),this.elements.forEach((e=>e.appendChild(document.createTextNode("")))),this.sheets=this.elements.map((e=>(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,r=t.length;nn.insertRule(t,e))),this.length++,!0}catch(n){return!1}}deleteRule(e){this.sheets.forEach((t=>t.deleteRule(e))),this.length--}getRule(e){const t=this.sheets[0].cssRules[e];return t&&t.cssText?t.cssText:""}},q=class TextTag{constructor(e){this.elements=(e||[void 0]).map((e=>W(e))),this.nodesMatrix=this.elements.map((e=>e.childNodes)),this.length=0}insertRule(e,t){return e<=this.length&&e>=0&&(this.nodesMatrix.forEach(((n,r)=>{const i=document.createTextNode(t),o=n[e];this.elements[r].insertBefore(i,o||null)})),this.length++,!0)}deleteRule(e){this.elements.forEach(((t,n)=>{t.removeChild(this.nodesMatrix[n][e])})),this.length--}getRule(e){return ee?new K(n[0]):t?new Q(n):new q(n))(this.options),new z(e)));var e}reconstructWithOptions(e,t=!0){return new CustomStylesheet(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0)}}const Y=(e={})=>(t,n,r,o,a)=>{const{disableCSSOMInjection:s=!1,disableVendorPrefixes:l=!1,stylisPlugins:u=[]}=e;return e=>{const{insideShadowDom:n,connectedPortals:r}=I(),o=(0,i.useMemo)((()=>new CustomStylesheet({target:[a,...r.map((e=>e.stylesWrapper))]})),[r]);return i.createElement(G.LC,{disableCSSOMInjection:s,disableVendorPrefixes:l,enableVendorPrefixes:!l,stylisPlugins:u,sheet:o},i.createElement(t,Object.assign({},e)))}};var Z=n(161);function J(e,t){const n={...e};for(const r of t)delete n[r];return n}const $=e=>`voomly:${e}`;class VoomlyPlayerEvent extends Event{constructor(e,t){super($(e)),this.payload=t}}class FromPlayerEmitter{constructor(e,t=new Z.EventEmitter){this.id=e,this.generalEmitter=t,this.destroyed=!1,this.nodeConnectedChecker=void 0,this.element=void 0,this.playerInstanceId=void 0,this.setNode=e=>{this.element=e},this.setNodeConnectedChecker=e=>{this.nodeConnectedChecker=e},this.isInitialized=()=>!!this.playerInstanceId,this.register=e=>{this.playerInstanceId=e},this.isDestroyed=()=>!!this.nodeConnectedChecker&&!this.nodeConnectedChecker?.checkConnected()||this.destroyed,this.destroy=()=>{this.generalEmitter.removeAllListeners(),this.destroyed=!0},this.createEventEmitter=e=>({on:t=>this.isDestroyed()?(console.warn("Voomly player API is already destroyed. You cannot subscribe to new events"),()=>{console.warn("Voomly player API is already destroyed. You cannot unsubscribe from old events. All subscribers are already removed.")}):(this.generalEmitter.on(e,t),()=>this.generalEmitter.off(e,t)),emit:t=>{if(this.isDestroyed())return;const n={...t,playerInfo:{id:this.id,instanceId:this.playerInstanceId}};this.generalEmitter.emit(e,n),this.id&&this.element?.dispatchEvent(new VoomlyPlayerEvent(e,n)),this.id&&this.playerInstanceId?(window?.dispatchEvent(new VoomlyPlayerEvent(e,n)),document?.dispatchEvent(new VoomlyPlayerEvent(e,n))):this.id&&console.warn(`Voomly player API is not initialized on the moment of "${e}" call, only direct subscribers will be notified.`)}}),this.timelineUnlock=this.createEventEmitter("timeline:unlock"),this.timelineTurnstileSkipped=this.createEventEmitter("timeline:turnstile:skipped"),this.timelineTurnstileCompleted=this.createEventEmitter("timeline:turnstile:completed"),this.timelineButtonClick=this.createEventEmitter("timeline:button:click"),this.timelineButtonEnter=this.createEventEmitter("timeline:button:enter"),this.timelineButtonPreExit=this.createEventEmitter("timeline:button:preExit"),this.timelineButtonExit=this.createEventEmitter("timeline:button:exit"),this.timelineImageClick=this.createEventEmitter("timeline:image:click"),this.timelineImageEnter=this.createEventEmitter("timeline:image:enter"),this.timelineImagePreExit=this.createEventEmitter("timeline:image:preExit"),this.timelineImageExit=this.createEventEmitter("timeline:image:exit"),this.timelineGridClick=this.createEventEmitter("timeline:grid:click"),this.timelineGridEnter=this.createEventEmitter("timeline:grid:enter"),this.timelineGridPreExit=this.createEventEmitter("timeline:grid:preExit"),this.timelineGridExit=this.createEventEmitter("timeline:grid:exit"),this.timelineSurveyClick=this.createEventEmitter("timeline:survey:click"),this.timelineSurveyEnter=this.createEventEmitter("timeline:survey:enter"),this.timelineSurveyPreExit=this.createEventEmitter("timeline:survey:preExit"),this.timelineSurveyExit=this.createEventEmitter("timeline:survey:exit"),this.timelineQuizChoice=this.createEventEmitter("timeline:quiz:choice"),this.timelineQuizEnter=this.createEventEmitter("timeline:quiz:enter"),this.timelineQuizExit=this.createEventEmitter("timeline:quiz:exit"),this.timelineAnnotationClick=this.createEventEmitter("timeline:annotation:click"),this.timelineImageAnnotationClick=this.createEventEmitter("timeline:imageAnnotation:click"),this.videoIsReady=this.createEventEmitter("video:ready"),this.videoPlayStarted=this.createEventEmitter("video:playStarted"),this.videoPaused=this.createEventEmitter("video:paused"),this.videoSeekStarted=this.createEventEmitter("video:seekStarted"),this.timeUpdate=this.createEventEmitter("video:timeUpdate"),this.videoSeeked=this.createEventEmitter("video:seeked"),this.qualityChanged=this.createEventEmitter("video:qualityChanged"),this.volumeChanged=this.createEventEmitter("video:volumeChanged"),this.speedChanged=this.createEventEmitter("video:speedChanged"),this.videoEnded=this.createEventEmitter("video:ended"),this.videoAutoplay=this.createEventEmitter("video:autoplay"),this.qualityOptions=this.createEventEmitter("video:qualityOptions"),this.speedOptions=this.createEventEmitter("video:speedOptions"),this.updateDimensions=this.createEventEmitter("video:updateDimensions")}}var ee=n(5641),te=n(2145);const ne=(0,te.createStandardAction)("customIntegration/TURNSTILE")();class PlayerActionDispatcher{constructor(){this.dispatch=void 0,this.isInitialized=()=>!!this.dispatch,this.doDispatch=e=>this.dispatch?this.dispatch(e):(console.error("Player dispatcher is not initialized"),!1),this.register=e=>{this.dispatch=e}}}class ToPlayerDispatcher{constructor(e=new PlayerActionDispatcher){this.dispatcher=e,this.destroyed=!1,this.nodeConnectedChecker=void 0,this.setNodeConnectedChecker=e=>{this.nodeConnectedChecker=e},this.isInitialized=this.dispatcher.isInitialized,this.register=this.dispatcher.register,this.isDestroyed=()=>!!this.nodeConnectedChecker&&!this.nodeConnectedChecker?.checkConnected()||this.destroyed,this.destroy=()=>{this.destroyed=!0},this.createEventEmitter=(e,t)=>({eventName:e,emit:e=>{this.isDestroyed()?console.warn("Voomly player API is already destroyed. You cannot make new calls"):this.dispatcher.doDispatch(t(e))}}),this.play=this.createEventEmitter("video:play",(e=>(0,ee.D0)({time:e?e.time:void 0}))),this.pause=this.createEventEmitter("video:pause",(()=>(0,ee.hz)({}))),this.seek=this.createEventEmitter("video:seek",(({time:e})=>(0,ee.ze)({time:e,type:"toTime"}))),this.changeVolume=this.createEventEmitter("video:changeVolume",(({volume:e})=>(0,ee.A9)({volume:e,type:"absoluteVolume"}))),this.mute=this.createEventEmitter("video:mute",(()=>(0,ee.A9)({mute:!0,type:"mute"}))),this.unmute=this.createEventEmitter("video:unmute",(()=>(0,ee.A9)({mute:!1,type:"mute"}))),this.enableAutoplay=this.createEventEmitter("video:enableAutoplay",(()=>(0,ee.H8)({isAutoplay:!0}))),this.disableAutoplay=this.createEventEmitter("video:disableAutoplay",(()=>(0,ee.H8)({isAutoplay:!1}))),this.changeQuality=this.createEventEmitter("video:changeQuality",(e=>(0,ee.kT)(e))),this.changeSpeed=this.createEventEmitter("video:changeSpeed",(({speed:e})=>(0,ee.YF)({value:e}))),this.enableCustomTurnstileIntegration=this.createEventEmitter("timeline:turnstile:enable",(()=>ne({}))),this.getSpeedOptions=this.createEventEmitter("video:speedOptions",(()=>(0,ee.wE)())),this.getQualityOptions=this.createEventEmitter("video:qualityOptions",(()=>(0,ee.wV)()))}}class VoomlyFromPlayerMessage{constructor(e,t){this.payload=t,this.eventName=void 0,this.eventName=$(e)}}class FromIFrameEventEmitter extends Z.EventEmitter{constructor(...e){super(...e),this.emit=(e,t)=>(t.playerInfo&&window?.parent?.postMessage(new VoomlyFromPlayerMessage(e,t),"*"),super.emit(e,t))}}class ToIFrameDispatcher extends ToPlayerDispatcher{constructor(){super(),this.listenToEvent=e=>{window.addEventListener("message",(({data:t,origin:n})=>{"https://embed.voomly.com"===n&&$(e.eventName)===t.eventName&&e.emit?.(t.payload)}))},Object.getOwnPropertyNames(this).forEach((e=>{const t=this[e];t?.eventName&&t?.emit&&this.listenToEvent({eventName:t.eventName,emit:t.emit})}))}}class PlayerExternalAPIConnectedChecker{constructor(e,t){this.element=e,this.onDisconnected=t,this.checkConnected=()=>!!this.element.isConnected||(console.debug("Checked that Voomly player API node was not connected:",this.element),this.onDisconnected?.(),!1)}}class PlayerExternalAPI{constructor(e,t,n=new FromPlayerEmitter(e,t?.isInIframe?new FromIFrameEventEmitter:void 0),r=(t?.isInIframe?new ToIFrameDispatcher:new ToPlayerDispatcher)){if(this.id=e,this.toAttach=t,this.fromEmitter=n,this.toEmitter=r,this.destroyed=!1,this.apiReadyEmitter=new Z.EventEmitter,this.isVideoReady=!1,this.isInitialized=()=>this.toEmitter.isInitialized()&&this.fromEmitter.isInitialized()&&!this.isDestroyed(),this.isDestroyed=()=>this.destroyed,this.destroy=()=>{this.apiReadyEmitter.off("ready"),this.fromEmitter.destroy(),this.toEmitter.destroy(),this.apiReadyEmitter.emit("destroy"),this.destroyed=!0},this.register=(e,t)=>{this.fromEmitter.register(t),this.toEmitter.register(e),this.apiReadyEmitter.emit("ready")},this.onAPIReady=e=>this.isInitialized()?(e(),()=>{}):(this.apiReadyEmitter.once("ready",e),()=>{this.apiReadyEmitter.off("ready",e)}),this.onDestroy=e=>{this.apiReadyEmitter.on("destroy",e)},this.seek=e=>{"number"==typeof e&&(console.warn("[DEPRECATED] `seek` method will take object {time: number} instead of number as argument, please use new format."),e={time:e}),this.toEmitter.seek.emit(e)},this.play=e=>{"number"==typeof e&&(console.warn("[DEPRECATED] `play` method will take object {time: number} instead of number as argument, please use new format."),e={time:e}),this.toEmitter.play.emit(e)},this.pause=this.toEmitter.pause.emit,this.changeVolume=this.toEmitter.changeVolume.emit,this.mute=this.toEmitter.mute.emit,this.unmute=this.toEmitter.unmute.emit,this.changeQuality=this.toEmitter.changeQuality.emit,this.changeSpeed=this.toEmitter.changeSpeed.emit,this.enableAutoplay=this.toEmitter.enableAutoplay.emit,this.disableAutoplay=this.toEmitter.disableAutoplay.emit,this.getQualityOptions=this.toEmitter.getQualityOptions.emit,this.getSpeedOptions=this.toEmitter.getSpeedOptions.emit,this.enableCustomTurnstileIntegration=this.toEmitter.enableCustomTurnstileIntegration.emit,this.onPlay=this.fromEmitter.videoPlayStarted.on,this.onPause=this.fromEmitter.videoPaused.on,this.onSeekStarted=this.fromEmitter.videoSeekStarted.on,this.onSeeked=this.fromEmitter.videoSeeked.on,this.onTimeUpdate=this.fromEmitter.timeUpdate.on,this.onQualityChange=this.fromEmitter.qualityChanged.on,this.onVolumeChange=this.fromEmitter.volumeChanged.on,this.onSpeedChange=this.fromEmitter.speedChanged.on,this.onReady=e=>this.isVideoReady?(e(),()=>{}):this.fromEmitter.videoIsReady.on(e),this.onAutoplay=this.fromEmitter.videoAutoplay.on,this.onEnd=this.fromEmitter.videoEnded.on,this.onGetQualityOptions=this.fromEmitter.qualityOptions.on,this.onGetSpeedOptions=this.fromEmitter.speedOptions.on,this.onUpdateDimensions=this.fromEmitter.updateDimensions.on,this.onTimelineUnlock=this.fromEmitter.timelineUnlock.on,this.onTimelineTurnstileSkipped=this.fromEmitter.timelineTurnstileSkipped.on,this.onTimelineTurnstileCompleted=this.fromEmitter.timelineTurnstileCompleted.on,this.onTimelineButtonClick=this.fromEmitter.timelineButtonClick.on,this.onTimelineButtonEnter=this.fromEmitter.timelineButtonEnter.on,this.onTimelineButtonPreExit=this.fromEmitter.timelineButtonPreExit.on,this.onTimelineButtonExit=this.fromEmitter.timelineButtonExit.on,this.onTimelineImageClick=this.fromEmitter.timelineImageClick.on,this.onTimelineImageEnter=this.fromEmitter.timelineImageEnter.on,this.onTimelineImagePreExit=this.fromEmitter.timelineImagePreExit.on,this.onTimelineImageExit=this.fromEmitter.timelineImageExit.on,this.onTimelineGridClick=this.fromEmitter.timelineGridClick.on,this.onTimelineGridEnter=this.fromEmitter.timelineGridEnter.on,this.onTimelineGridPreExit=this.fromEmitter.timelineGridPreExit.on,this.onTimelineGridExit=this.fromEmitter.timelineGridExit.on,this.onTimelineSurveyClick=this.fromEmitter.timelineSurveyClick.on,this.onTimelineSurveyEnter=this.fromEmitter.timelineSurveyEnter.on,this.onTimelineSurveyPreExit=this.fromEmitter.timelineSurveyPreExit.on,this.onTimelineSurveyExit=this.fromEmitter.timelineSurveyExit.on,this.onTimelineQuizChoice=this.fromEmitter.timelineQuizChoice.on,this.onTimelineQuizEnter=this.fromEmitter.timelineQuizEnter.on,this.onTimelineQuizExit=this.fromEmitter.timelineQuizExit.on,this.onTimelineAnnotationClick=this.fromEmitter.timelineAnnotationClick.on,this.onTimelineImageAnnotationClick=this.fromEmitter.timelineImageAnnotationClick.on,t?.mountNode){const e=new PlayerExternalAPIConnectedChecker(t.mountNode,this.destroy);this.fromEmitter.setNode(t?.mountNode),this.fromEmitter.setNodeConnectedChecker(e),this.toEmitter.setNodeConnectedChecker(e)}this.fromEmitter.videoIsReady.on((()=>{this.isVideoReady=!0}))}}class PlayerInViewportObserver{constructor(e,t){this.element=e,this.playerExternalAPI=t,this.run=()=>{this.playerExternalAPI.onAPIReady((()=>{if(window&&window.location===window.parent.location){const e=new IntersectionObserver((e=>{e.some((e=>e.isIntersecting))?this.playerExternalAPI.enableAutoplay():this.playerExternalAPI.disableAutoplay()}),{threshold:.01});e.observe(this.element),this.playerExternalAPI.onAutoplay((()=>{e.disconnect()})),this.playerExternalAPI.onDestroy((()=>{e.disconnect()}))}else this.playerExternalAPI.enableAutoplay()}))}}}class PlayerTimestamper{constructor(e,t){this.videoId=void 0,this.playerExternalAPI=void 0,this.run=()=>{this.playerExternalAPI.onAPIReady((()=>{const e=this.playerExternalAPI.onReady((()=>{this.gotoTimestamp(),e()}))}))},this.gotoTimestamp=()=>{const e=this.getTimestampsFromQueryString();e.length&&(this.isGlobalSeek(e)?this.globalSeek(e):this.perVideoSeek(e))},this.perVideoSeek=e=>{const t=e.find((e=>this.isTimestampWithVideoId(e)&&e.split(",")[1]===this.videoId));if(t){const e=t.split(",")[0];this.seek(parseFloat(e))}},this.globalSeek=e=>{this.seek(parseFloat(e[0]))},this.seek=e=>{this.playerExternalAPI.seek({time:e})},this.isGlobalSeek=e=>1===e.length&&!this.isTimestampWithVideoId(e[0]),this.isTimestampWithVideoId=e=>{const t=e.split(","),n=t[0],r=t[1];return 2===t.length&&r&&parseFloat(n)>0},this.getTimestampsFromQueryString=()=>new URLSearchParams(window.location.search).getAll("t"),this.videoId=e,this.playerExternalAPI=t}}var re=n(3511),ie=n(5183);class AskToResumeOnVisitWatcher{constructor(){this.embedVideoId=void 0,this.lastCurrentTime=void 0,this.enabled=!1,this.duration=void 0,this.destruct=()=>{this.saveTimeIfApplicable(),this.unsubscribe()},this.saveTimeIfApplicable=()=>{if(this.embedVideoId&&this.lastCurrentTime&&this.enabled&&this.duration){const t=`voomly-lvws-${this.embedVideoId}`;try{this.lastCurrentTime>3&&this.lastCurrentTime{try{const t=re.A7.getItem(`voomly-lvws-${e}`,void 0);if(t)return parseInt(t,10)}catch(t){console.warn("Cannot get last visit time from local storage. Probably using iframe.")}};var ae=n(2322);const se=i.createContext({container:null,setContainer:()=>console.error("VideoItemsContainerContext setContainer was not set!")}),le=({children:e})=>{const[t,n]=(0,i.useState)(null),r=(0,i.useMemo)((()=>({container:t,setContainer:n})),[t,n]);return(0,ae.jsx)(se.Provider,{value:r,children:e})};var ue=n(3744),ce=n(4144),de=n(6580);function fe(e){var t=(0,i.useRef)();return(0,i.useEffect)((function(){t.current=e})),t.current}var he=function(e,t){return e===t};function pe(e,t){void 0===t&&(t=he);var n,r=(0,i.useRef)(),o=(0,i.useRef)(e);return((n=(0,i.useRef)(!0)).current?(n.current=!1,!0):n.current)||t(o.current,e)||(r.current=o.current,o.current=e),r.current}var me=n(6196),ge=n(4785);const ve=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const ye=function(e){return this.__data__.has(e)};function be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ge.Z;++ts))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,p=2&n?new Ee:void 0;for(o.set(e,t),o.set(t,e);++d"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Ke=()=>Math.random().toString(36).substring(7).split("").join("."),Ye={INIT:`@@redux/INIT${Ke()}`,REPLACE:`@@redux/REPLACE${Ke()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ke()}`};function Ze(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Je(e,t,n){if("function"!=typeof e)throw new Error(Qe(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Qe(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Qe(1));return n(Je)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach(((e,t)=>{a.set(t,e)})))}function c(){if(l)throw new Error(Qe(3));return i}function d(e){if("function"!=typeof e)throw new Error(Qe(4));if(l)throw new Error(Qe(5));let t=!0;u();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(Qe(6));t=!1,u(),a.delete(n),o=null}}}function h(e){if(!Ze(e))throw new Error(Qe(7));if(void 0===e.type)throw new Error(Qe(8));if("string"!=typeof e.type)throw new Error(Qe(17));if(l)throw new Error(Qe(9));try{l=!0,i=r(i,e)}finally{l=!1}return(o=a).forEach((e=>{e()})),e}h({type:Ye.INIT});const p={dispatch:h,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Qe(10));r=e,h({type:Ye.REPLACE})},[qe]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Qe(11));function n(){const e=t;e.next&&e.next(c())}n();return{unsubscribe:e(n)}},[qe](){return this}}}};return p}function $e(e){const t=Object.keys(e),n={};for(let a=0;a{const n=e[t];if(void 0===n(void 0,{type:Ye.INIT}))throw new Error(Qe(12));if(void 0===n(void 0,{type:Ye.PROBE_UNKNOWN_ACTION()}))throw new Error(Qe(13))}))}(n)}catch(o){i=o}return function(e={},t){if(i)throw i;let o=!1;const a={};for(let i=0;ie:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var tt=n(8022),nt=n.n(tt),rt="persist:",it="persist/FLUSH",ot="persist/REHYDRATE",at="persist/PAUSE",st="persist/PERSIST",lt="persist/PURGE",ut="persist/REGISTER";function ct(e){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ct(e)}function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e,t,n,r){r.debug;var i=function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wt(e,t){var n=void 0!==e.version?e.version:-1,r=(e.debug,void 0===e.stateReconciler?ht:e.stateReconciler),i=e.getStoredState||gt,o=void 0!==e.timeout?e.timeout:5e3,a=null,s=!1,l=!0,u=function(e){return e._persist.rehydrated&&a&&!l&&a.update(e),e};return function(c,d){var h=c||{},p=h._persist,m=At(h,["_persist"]);if(d.type===st){var g=!1,v=function(t,n){g||(d.rehydrate(e.key,t,n),g=!0)};if(o&&setTimeout((function(){!g&&v(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))}),o),l=!1,a||(a=pt(e)),p)return Et({},t(m,d),{_persist:p});if("function"!=typeof d.rehydrate||"function"!=typeof d.register)throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),i(e).then((function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,n).then((function(e){v(e)}),(function(e){v(void 0,e)}))}),(function(e){v(void 0,e)})),Et({},t(m,d),{_persist:{version:n,rehydrated:!1}})}if(d.type===lt)return s=!0,d.result(function(e){var t=e.storage,n="".concat(void 0!==e.keyPrefix?e.keyPrefix:rt).concat(e.key);return t.removeItem(n,yt)}(e)),Et({},t(m,d),{_persist:p});if(d.type===it)return d.result(a&&a.flush()),Et({},t(m,d),{_persist:p});if(d.type===at)l=!0;else if(d.type===ot){if(s)return Et({},m,{_persist:Et({},p,{rehydrated:!0})});if(d.key===e.key){var y=t(m,d),b=d.payload,E=Et({},!1!==r&&void 0!==b?r(b,c,y,e):y,{_persist:Et({},p,{rehydrated:!0})});return u(E)}}if(!p)return t(c,d);var S=t(m,d);return S===m?c:u(Et({},S,{_persist:p}))}}function _t(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ut:return Ot({},e,{registry:[].concat(_t(e.registry),[t.key])});case ot:var n=e.registry.indexOf(t.key),r=_t(e.registry);return r.splice(n,1),Ot({},e,{registry:r,bootstrapped:0===r.length});default:return e}};var kt=n(4549);const Rt={isVideoReady:!1,hasStarted:!1,isAutoplayEnabled:!1,isPlayPauseSilentMode:!1,isEnded:!1,wasEnded:!1,isPlayRequested:!1,currentTime:0,percentsLoaded:0,muted:!1,paused:!0,speed:1,volume:1,quality:-1,isPlayBlockedBySideEffect:!1,isBotDetected:!1},Lt=(e=Rt,t)=>{switch(t.type){case(0,te.getType)(ee.Pj):return{...e,...t.payload};case(0,te.getType)(ee.ni):return{...e,volume:t.payload.volume,muted:t.payload.muted};case(0,te.getType)(ee.gp):return{...e,quality:t.payload.quality};case(0,te.getType)(ee.Zu):return{...e,isEnded:!1,currentTime:t.payload.toTime,startedSeekingTime:t.payload.toTime};case(0,te.getType)(ee.BN):{if(!e.startedSeekingTime)return e;const n="seeked"===t.payload.seekType;return{...e,isEnded:!1,currentTime:n?e.startedSeekingTime:e.currentTime,startedSeekingTime:n?void 0:e.startedSeekingTime}}case(0,te.getType)(ee.yj):return{...e,speed:t.payload};case(0,te.getType)(ee.b3):return{...e,currentTime:t.payload.newTime};case(0,te.getType)(ee.Gq):return{...e,percentsLoaded:t.payload};case(0,te.getType)(ee.wF):return{...e,isVideoReady:!0,isEnded:!1};case(0,te.getType)(ee.K):return{...e,isPlayRequested:!0,paused:!1,hasStarted:!0,isEnded:!1};case(0,te.getType)(ee.x9):return{...e,paused:!0,isPlayRequested:!1};case(0,te.getType)(ee.zJ):return{...e,isPlayRequested:!0,isEnded:!1};case(0,te.getType)(ee.Wn):return{...e,wasEnded:!0,isEnded:!0};case(0,te.getType)(ee.D0):case(0,te.getType)(ee.hz):return{...e,isPlayPauseSilentMode:!!t.payload.isSilent};case(0,te.getType)(ee.cX):return{...e,isBotDetected:t.payload};case(0,te.getType)(ee.H8):return{...e,...t.payload.isSilent?{}:{isAutoplayEnabled:t.payload.isAutoplay}}}return e},Nt=(0,te.createStandardAction)("ctaFooter/UPDATE_VISIBLE")(),Pt={},Dt=(e=Pt,t)=>t.type===(0,te.getType)(Nt)?{...e,visibleCtaFooter:t.payload}:e,Bt=(0,te.createStandardAction)("chapters/TOGGLE_VISIBILITY")(),Mt={isVisible:!1},Ft=(e=Mt,t)=>t.type===(0,te.getType)(Bt)?{...e,isVisible:t.payload.isVisible}:e,Ut=(0,te.createStandardAction)("subtitles/TOGGLE_VISIBILITY")(),jt=(0,te.createStandardAction)("subtitles/CHANGE_CURRENT_SUBTITLES_NAME")(),Ht={isVisible:!1,currentSubtitlesName:void 0},Vt=(e=Ht,t)=>{switch(t.type){case(0,te.getType)(Ut):return{...e,isVisible:void 0===t.payload?!e.isVisible:t.payload};case(0,te.getType)(jt):return{...e,currentSubtitlesName:t.payload}}return e},Gt=(0,te.createStandardAction)("dimensions/setContainerDimensions")(),zt=(0,te.createStandardAction)("dimensions/setVideoDimensions")(),Xt=(0,te.createStandardAction)("dimensions/SET_IS_FULL_SCREEN")(),Wt=(0,te.createStandardAction)("dimensions/SET_FORCE_ASPECT_RATIO")(),Qt=(0,te.createStandardAction)("dimensions/TOGGLE_FULL_SCREEN")(),qt=(0,te.createStandardAction)("videoControls/ENABLE_NATIVE_FULLSCREEN_FALLBACK")(),Kt=(0,te.createStandardAction)("videoControls/DISABLE_NATIVE_FULLSCREEN_FALLBACK")(),Yt={containerDimensions:{width:0,height:0},videoDimensions:{width:0,height:0},isFullScreen:!1,isNativeFullScreenFallbackEnabled:!1,forceAspectRatio:void 0};const Zt=function(e=Yt,t){switch(t.type){case(0,te.getType)(Gt):return{...e,containerDimensions:t.payload};case(0,te.getType)(zt):return{...e,videoDimensions:t.payload};case(0,te.getType)(Xt):return{...e,isFullScreen:t.payload};case(0,te.getType)(qt):return{...e,isNativeFullScreenFallbackEnabled:!0};case(0,te.getType)(Kt):return{...e,isNativeFullScreenFallbackEnabled:!1};case(0,te.getType)(Wt):return{...e,forceAspectRatio:t.payload};case(0,te.getType)(Qt):return{...e,isFullScreen:!e.isFullScreen};default:return e}},Jt=(0,te.createStandardAction)("thumbnail/UPDATE_THUMBNAIL")(),$t=(0,te.createStandardAction)("thumbnail/UPDATE_VISIBILITY")(),en=(0,te.createStandardAction)("thumbnail/SET_CUSTOM_VIDEO")(),tn={thumbnail:void 0,customVideo:void 0,isVisible:!0},nn=(e=tn,t)=>{switch(t.type){case(0,te.getType)(Jt):return{...e,thumbnail:t.payload};case(0,te.getType)($t):return{...e,isVisible:t.payload};case(0,te.getType)(ee.K):case(0,te.getType)(ee.ze):case(0,te.getType)(ee.Zu):case(0,te.getType)(ee.BN):return{...e,isVisible:!1};case(0,te.getType)(en):return{...e,customVideo:t.payload}}return e},rn=(0,te.createStandardAction)("playPauseOverlay/BLOCK")(),on=(0,te.createStandardAction)("playPauseOverlay/UNBLOCK")(),an={blockedBy:[]},sn=(e=an,t)=>{switch(t.type){case(0,te.getType)(rn):return{...e,blockedBy:e.blockedBy.concat(t.payload)};case(0,te.getType)(on):return{...e,blockedBy:e.blockedBy.filter((e=>e!==t.payload))}}return e},ln=(0,te.createStandardAction)("askToResumeOverlay/UPDATE_VISIBLE")(),un={},cn=(e=un,t)=>{switch(t.type){case(0,te.getType)(ee.zJ):return{visibleAskToResumeOverlay:void 0};case(0,te.getType)(ln):return{...e,visibleAskToResumeOverlay:t.payload}}return e},dn=(0,te.createStandardAction)("videoItems/DISMISS_ITEM")(),fn=(0,te.createStandardAction)("videoItems/HIGHLIGHT")(),hn=(0,te.createStandardAction)("videoItems/ITEM_CLICKED")(),pn=(0,te.createStandardAction)("videoItems/PERFORM_ACTION")(),mn=(0,te.createStandardAction)("videoItems/RESET_HIGHLIGHTS")(),gn={dismissedItemsIds:[],rememberedDismissedItemIds:[],highlightedItemId:void 0},vn=(e=gn,t)=>{switch(t.type){case(0,te.getType)(mn):return{...e,highlightedItemId:void 0};case(0,te.getType)(dn):return t.payload.remember?{...e,rememberedDismissedItemIds:[...e.rememberedDismissedItemIds,t.payload.id]}:{...e,dismissedItemsIds:[...e.dismissedItemsIds,t.payload.id]};case(0,te.getType)(fn):return{...e,highlightedItemId:t.payload}}return e},yn=(0,te.createStandardAction)("miscScreenObjects/toggleSwallowPlayPauseOverlay")(),bn=(0,te.createStandardAction)("miscScreenObjects/toggleAlternativeDurationLine")(),En=(0,te.createStandardAction)("miscScreenObjects/updateAlternativeLineProgress")(),Sn=(0,te.createStandardAction)("miscScreenObjects/appendBackButtonReference")(),An=(0,te.createStandardAction)("miscScreenObjects/popBackButton")(),wn={alternativeDurationLine:void 0,swallowPlayPauseOverlay:!1,backButtonReferences:[]},_n=(e=wn,t)=>{switch(t.type){case(0,te.getType)(yn):return{...e,swallowPlayPauseOverlay:t.payload};case(0,te.getType)(bn):return{...e,alternativeDurationLine:t.payload};case(0,te.getType)(En):return e.alternativeDurationLine?{...e,alternativeDurationLine:{...e.alternativeDurationLine,percents:t.payload}}:e;case(0,te.getType)(Sn):return{...e,backButtonReferences:[...e.backButtonReferences,t.payload]};case(0,te.getType)(An):return{...e,backButtonReferences:e.backButtonReferences.slice(0,-1)}}return e},Tn=(0,te.createStandardAction)("sourceConfiguration/SET")(),On=(0,te.createStandardAction)("sourceConfiguration/PRELOAD_NEXT")(),In=(0,te.createStandardAction)("sourceConfiguration/clearPreloadQueue")(),xn=(0,te.createStandardAction)("sourceConfiguration/newSourceConfigurationEmitted")(),Cn=(0,te.createStandardAction)("sourceConfiguration/REGISTER_CALLBACKS")(),kn=(0,te.createStandardAction)("sourceConfiguration/REQUEST_NAVIGATE_TO_OTHER_NODE")(),Rn={},Ln=(e=Rn,t)=>{switch(t.type){case(0,te.getType)(Tn):return{...e,current:{...e.current,...t.payload}};case(0,te.getType)(On):return e.current?{...e,next:t.payload}:e;case(0,te.getType)(In):return e.current&&e.next?{...e,current:e.next,next:void 0,nextCurrentTime:e.next.playbackSettings.currentTime}:e;case(0,te.getType)(ee.b3):return{...e,nextCurrentTime:void 0}}return e},Nn=(0,te.createStandardAction)("videoControls/ADD_CONTROLS_STAY_VISIBLE_BY")(),Pn=(0,te.createStandardAction)("videoControls/REMOVE_CONTROLS_STAY_VISIBLE_BY")(),Dn=(0,te.createStandardAction)("videoControls/SHOW_CONTROLS")(),Bn=(0,te.createStandardAction)("videoControls/HIDE_CONTROLS")(),Mn=(0,te.createStandardAction)("videoControls/CHANGE_CLICK_FOR_SOUND_VISIBILITY")(),Fn=(0,te.createStandardAction)("videoControls/CHANGE_LOGO_VISIBILITY")(),Un=(0,te.createStandardAction)("videoControls/REGISTER_MOUSE_CHANNEL")(),jn=(0,te.createStandardAction)("videoControls/ENABLE_SHORTCUTS")(),Hn=(0,te.createStandardAction)("videoControls/DISABLE_SHORTCUTS")(),Vn=(0,te.createStandardAction)("videoControls/ENABLE_CONTROLS")(),Gn=(0,te.createStandardAction)("videoControls/DISABLE_CONTROLS")(),zn={areControlsVisible:!1,areControlsDisabled:!1,controlsStayVisibleBy:[],areSeekControlsBlocked:!1,isLogoVisible:!1,isClickForSoundVisible:!1,areShortcutsDisabled:!1},Xn=(e=zn,t)=>{switch(t.type){case(0,te.getType)(Nn):return{...e,controlsStayVisibleBy:e.controlsStayVisibleBy.includes(t.payload)?e.controlsStayVisibleBy:[...e.controlsStayVisibleBy,t.payload]};case(0,te.getType)(Pn):return{...e,controlsStayVisibleBy:e.controlsStayVisibleBy.filter((e=>e!==t.payload))};case(0,te.getType)(Dn):return{...e,areControlsVisible:!0};case(0,te.getType)(Bn):return{...e,areControlsVisible:!1};case(0,te.getType)(Mn):return{...e,isClickForSoundVisible:t.payload.isVisible};case(0,te.getType)(jn):return{...e,areShortcutsDisabled:!1};case(0,te.getType)(Hn):return{...e,areShortcutsDisabled:!0};case(0,te.getType)(Vn):return{...e,areControlsDisabled:!1};case(0,te.getType)(Gn):return{...e,areControlsDisabled:!0};case(0,te.getType)(ee.A9):return"mute"in t.payload&&t.payload.mute&&"autoplay"===t.payload.by?{...e,isClickForSoundVisible:!0}:{...e,isClickForSoundVisible:!1};case(0,te.getType)(ee.ni):return t.payload.muted?e:{...e,isClickForSoundVisible:!1};case(0,te.getType)(ee.K):return{...e,isLogoVisible:!0};case(0,te.getType)(ee.x9):return{...e,areControlsVisible:!0};default:return e}};var Wn=function(e){return"@@redux-saga/"+e},Qn=Wn("CANCEL_PROMISE"),qn=Wn("CHANNEL_END"),Kn=Wn("IO"),Yn=Wn("MATCH"),Zn=Wn("MULTICAST"),Jn=Wn("SAGA_ACTION"),$n=Wn("SELF_CANCELLATION"),er=Wn("TASK"),tr=Wn("TASK_CANCEL"),nr=Wn("TERMINATE"),rr=Wn("LOCATION"),ir=n(2389),or=n(8283),ar=function(e){return null==e},sr=function(e){return null!=e},lr=function(e){return"function"==typeof e},ur=function(e){return"string"==typeof e},cr=Array.isArray,dr=function(e){return e&&lr(e.then)},fr=function(e){return e&&lr(e.next)&&lr(e.throw)},hr=function e(t){return t&&(ur(t)||gr(t)||lr(t)||cr(t)&&t.every(e))},pr=function(e){return e&&lr(e.take)&&lr(e.close)},mr=function(e){return lr(e)&&e.hasOwnProperty("toString")},gr=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},vr=function(e){return pr(e)&&e[Zn]};const yr=function(e,t){var n;void 0===t&&(t=!0);var r=new Promise((function(r){n=setTimeout(r,Math.min(2147483647,e),t)}));return r[Qn]=function(){clearTimeout(n)},r};var br=function(e){return function(){return e}}(!0),Er=function(){};var Sr=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var Ar=function(e,t){(0,ir.Z)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))};function wr(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var _r=function(e){throw e},Tr=function(e){return{value:e,done:!0}};function Or(e,t,n){void 0===t&&(t=_r),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:Tr,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function Ir(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var xr=function(e){return Array.apply(null,new Array(e))},Cr=function(e){return function(t){return e(Object.defineProperty(t,Jn,{value:!0}))}},kr=function(e){return e===nr},Rr=function(e){return e===tr},Lr=function(e){return kr(e)||Rr(e)};function Nr(e,t){var n=Object.keys(e),r=n.length;var i,o=0,a=cr(e)?xr(r):{},s={};return n.forEach((function(e){var n=function(n,s){i||(s||Lr(n)?(t.cancel(),t(n,s)):(a[e]=n,++o===r&&(i=!0,t(a))))};n.cancel=Er,s[e]=n})),t.cancel=function(){i||(i=!0,n.forEach((function(e){return s[e].cancel()})))},s}function Pr(e){return{name:e.name||"anonymous",location:Dr(e)}}function Dr(e){return e[rr]}function Br(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r1?t-1:0),r=1;r2?h-2:0),m=2;m2?n-2:0),i=2;i2?n-2:0),i=2;i2?n-2:0),i=2;i2?n-2:0),i=2;i1?t-1:0),r=1;r1?t-1:0),r=1;re.thumbnail.isVisible,So=e=>e.thumbnail,Ao=e=>e.thumbnail.customVideo,wo=e=>e.funnelState,_o=e=>e.funnelState.wasChaptersToggled,To=e=>e.funnelState.stopAnalyticsNodeId;var Oo=n(5994),Io=n(5742);const xo=e=>Boolean(e.actionOnClick),Co=e=>Boolean(e.actionsOnEnter),ko=e=>Boolean(e.actionsOnPreExit),Ro=e=>"turnstile"===e.type?`turnstile-${e.id}`:`quiz-turnstile-${e.id}`,Lo=e=>"turnstile"===e.type?`turnstile-${e.id}-email-collected`:`quiz-turnstile-${e.id}-email-collected`,No=(e,t)=>{const n=Date.parse(e),r=new Date;if(r.setDate(r.getDate()-1),"everyDay"===t&&r.getTime()>n)return!0;const i=new Date;return i.setDate(i.getDate()-7),"everyWeek"===t&&i.getTime()>n||void 0},Po=e=>{let t;if("turnstile"===e.type)t=e;else{if("quiz"!==e.type)return!1;t=e.turnstile}const n=Lo(e),r=re.A7.getItem(n);if(r&&"untilEmailCollected"===t.showFrequency)return!1;const i=Ro(e),o=re.A7.getItem(i);return o&&"once"===t.showFrequency?!t.skippable&&!r:!o||"always"===t.showFrequency||("everyWeek"!==t.showFrequency&&"everyDay"!==t.showFrequency||No(o,t.showFrequency))},Do=e=>`shareGate-${e.id}`,Bo=e=>Math.round(10*e)/10,Mo=(0,Oo.P1)((e=>e.videoItemsOnScreen.dismissedItemsIds),(e=>e.videoItemsOnScreen.rememberedDismissedItemIds),((e,t)=>e.concat(t))),Fo=e=>!("turnstile"===e.type&&!Po(e)||"shareGate"===e.type&&!(e=>{const t=Do(e),n=re.A7.getItem(t);return(!n||"once"!==e.showFrequency)&&(!n||"always"===e.showFrequency||"everyWeek"!==e.showFrequency&&"everyDay"!==e.showFrequency||No(n,e.showFrequency))})(e)),Uo=(0,Oo.P1)(Mo,bo.Tb,bo.$W,Io.Xn,bo.OE,bo.R3,((e,t,n,r,i,o)=>o?t.filter((t=>{const n=Bo(t.startSecond),o=Bo(t.endSecond),a=Bo(i??r);return!!(n<=a&&a<=o)&&(Fo(t)&&!e.includes(t.id))})):n),{memoizeOptions:{resultEqualityCheck:de.wU,maxSize:2}}),jo=(0,Oo.P1)(Uo,Mo,((e,t)=>e.filter((e=>!t.includes(e.id)&&Co(e)&&e.actionsOnEnter.some((e=>"dimBackground"===e.type))))),{memoizeOptions:{resultEqualityCheck:de.wU,maxSize:2}}),Ho=(0,Oo.P1)([jo,Io.Xn],((e,t)=>e.some((e=>Bo(e.startSecond)<=Bo(t)&&Bo(t)<=Bo(e.endSecond))))),Vo=e=>e.miscScreenObjects.alternativeDurationLine,Go=e=>e.miscScreenObjects.alternativeDurationLine?.percents;var zo;class PlayerExternalAPIHolder{constructor(){this.apiMap=new Map,this.getApiInstance=e=>this.apiMap.get(e),this.register=(e,t,n)=>{t((0,ee.u7)({api:n})),n.register(t,e),this.apiMap.set(e,n)}}}zo=PlayerExternalAPIHolder,PlayerExternalAPIHolder.instance=new zo;const Xo=e=>e.sourceConfiguration.current?.playbackSettings.areKeybindingsGlobal||e.dimensions.isFullScreen,Wo=e=>{const{backButtonReferences:t}=e.miscScreenObjects,n=t[t.length-1];if(n)return n},Qo=e=>"grid"!==e.type&&"survey"!==e.type&&"quiz"!==e.type||e.actionsOnEnter.some((e=>"pause"===e.type))?e.startSecond:e.endSecond-1,qo=(0,Oo.P1)([Mo,bo.Tb,bo.m2],((e,t,n)=>{if(n&&![ie.V.TIMELINE_EDITOR,ie.V.THUMBNAIL_EDITOR].includes(n))return t.filter((t=>!(e.indexOf(t.id)>-1)&&(!!Fo(t)&&("shareGate"===t.type||"turnstile"===t.type||("grid"===t.type||"survey"===t.type||"quiz"===t.type)&&t.isRequired)))).sort(((e,t)=>Qo(e)-Qo(t)))[0]})),Ko=(0,Oo.P1)(qo,Vo,((e,t)=>e?Qo(e):t?t.startAtTime:void 0)),Yo=(0,Oo.P1)(qo,Io.Xn,Vo,Uo,((e,t,n,r)=>{const i=r.some((e=>"quiz"===e.type))&&!n;return void 0!==n||i||e&&Bo(t)>=Bo(Qo(e))})),Zo=e=>e.storeId,Jo=e=>PlayerExternalAPIHolder.instance.getApiInstance(e.storeId);function*$o(){const e=(0,bo.it)(yield*ho()),t=(0,bo.CZ)(yield*ho()),n=(0,bo.hn)(yield*ho());if((0,bo.Zh)(yield*ho()))return;if(!e)return;yield*so(mn());let r=t?t.currentTime:0;const i=t?t.lastVisitWatchedSeconds:void 0;n&&n.metadata.duration<=r&&(r=0);let o=r>0;Eo(yield*ho())||(o=!0);const{resumeOnFutureVisitsEnabled:a,autoplay:s}=e.general;a&&!s||(yield*so(ln(void 0))),o&&(yield*so((0,ee.Sp)({time:r,doubleSeek:!0})));if(!(!!(0,Io.yf)(yield*ho()).isAutoplayEnabled&&(yield*lo(ea,(0,ee.H8)({isAutoplay:!0,isSilent:!0}))))){const e=!!(0,bo.CQ)(yield*ho()),t=wo(yield*ho());yield*so((0,ee.A9)({mute:(e?t.muted:void 0)??!1,type:"mute"})),a&&i&&!o&&(yield*so(ln({resumeFromSecond:i})))}const l=Jo(yield*ho());l?.fromEmitter.videoIsReady.emit()}function*ea(e){if(!e.payload.isAutoplay)return;if((0,Io.yf)(yield*ho()).hasStarted)return!0;const t=(0,bo.m2)(yield*ho()),n=(0,bo.it)(yield*ho()),r=(0,bo.CZ)(yield*ho());if(!n)return;const{autoplay:i}=n.general,o=r?.forceAutoPlay,a=!(t&&[ie.V.TIMELINE_EDITOR,ie.V.THUMBNAIL_EDITOR].includes(t))&&(o||i),s=!!(0,bo.CQ)(yield*ho()),l=wo(yield*ho()),u=(s?l.muted:void 0)??n.general.muted;return u&&a&&(yield*so(Mn({isVisible:!0}))),a?(yield*so((0,ee.fY)({muted:u})),!0):void 0}function*ta(){yield*ao(ee.wF,$o),yield*ao(ee.H8,ea)}Object.defineProperty($o,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/initialVideoReadySaga.ts",lineNumber:26,code:null}}),Object.defineProperty(ea,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/initialVideoReadySaga.ts",lineNumber:94,code:null}}),Object.defineProperty(ta,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/initialVideoReadySaga.ts",lineNumber:137,code:null}});const na=(0,te.createStandardAction)("funnelState/STOP_ANALYTICS_FOR_NODE")(),ra=e=>e.chapters.isVisible;function*ia(e){const t=(0,bo.gh)(yield*ho());t&&(yield*so(yn(!0)),yield*so((0,ee.AI)({time:t.playbackSettings?.currentTime||0,initiatedBy:"nextVideoPlay"})))}function*oa(e){if("nextVideoPlay"!==e.payload.initiatedBy)return;if(!(0,bo.Zh)(yield*ho()))return void console.error("Wanted to switch to next video, but it' empty!");const t=(0,Io.yf)(yield*ho()),n=ra(yield*ho()),r=_o(yield*ho());yield*so(bn(void 0)),yield*so(In()),yield*so(mn());const i=(0,bo.P4)(yield*ho());yield*so((0,ee.YF)({value:t.speed})),yield*so(Bt({isVisible:r?n:!!i})),yield*so((0,ee.fY)({muted:(0,Io.u_)(yield*ho())}));const o=Jo(yield*ho());o?.fromEmitter.videoIsReady.emit(),yield*go(100),yield*so(yn(!1))}function*aa(e){const t=(0,bo.Ee)(yield*ho());t&&(yield*so(na({nodeId:t})))}function*sa(){yield*oo(ee.wF,ia),yield*oo(ee.Vt,oa),yield*oo(kn,aa)}Object.defineProperty(ia,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/nextVideoSaga.ts",lineNumber:39,code:null}}),Object.defineProperty(oa,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/nextVideoSaga.ts",lineNumber:57,code:null}}),Object.defineProperty(aa,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/nextVideoSaga.ts",lineNumber:104,code:null}}),Object.defineProperty(sa,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/nextVideoSaga.ts",lineNumber:113,code:null}});var la=n(9798);function*ua(){for(;;){const e=(0,bo.CZ)(yield*ho()),t=yield*io(Tn);if(We(t.payload.playbackSettings,e))return;t.payload.playbackSettings.currentTime>=0&&(0,Io.L6)(yield*ho())&&!(0,bo.Zh)(yield*ho())&&(yield*so((0,ee.ze)({type:"toTime",initiatedBy:"playWith",time:t.payload.playbackSettings.currentTime}))),!(0,la.Eb)(yield*ho())&&t.payload.playbackSettings.forceAspectRatio&&(yield*so(Wt(t.payload.playbackSettings.forceAspectRatio)))}}function*ca(){yield*uo(ua)}Object.defineProperty(ua,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playbackSettingsChangeSaga.ts",lineNumber:10,code:null}}),Object.defineProperty(ca,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playbackSettingsChangeSaga.ts",lineNumber:40,code:null}});const da="highlight-nothing-hide-everything",fa=()=>{try{return window.self!==window.top}catch(e){return!0}},ha=(0,te.createStandardAction)("analytics/SEND_EVENTS_BEFORE_REDIRECT")(),pa=(0,te.createStandardAction)("analytics/INTERNAL_FORCE_SEND_LATEST_EVENTS")(),ma=(0,te.createStandardAction)("analytics/SEND_EVENTS_BEFORE_UNLOAD")(),ga=(0,te.createStandardAction)("analytics/SEND_QUIZ_ANSWERS")();function*va(e){const t=(0,bo.it)(yield*ho()),n=(0,bo.FM)(yield*ho()),r=(0,bo.hn)(yield*ho()),i=Jo(yield*ho()),o=(0,bo.m2)(yield*ho()),a=(0,bo.Tr)(yield*ho()),{muted:s,volume:l}=(0,Io.yf)(yield*ho());if(r){const e=r.metadata.duration;yield*so((0,ee.b3)({newTime:e}))}if(!t)return;i?.fromEmitter.videoEnded.emit();const{general:{onEnd:{action:u,redirectUrl:c}},playNodeIdOnEnd:d}=t;if(d||"REQUEST_SWITCH_TO_NEXT_VIDEO"===u)return yield*so(fn(da)),void(d&&(yield*so(kn({nodeId:d,muted:s,volume:l}))));switch(u){case"PAUSE_ON_LAST_FRAME":yield*so((0,ee.hz)({})),yield*so(Fn({isVisible:!0}));break;case"LOOP":if(n?.funnelId)break;yield*so((0,ee.ze)({time:0,type:"toTime"})),yield*so((0,ee.D0)({}));break;case"REDIRECT_TO_URL":if(o===ie.V.NORMAL&&!fa()){const e=()=>{const e=c;e&&(window.location.href=e)};a?yield*so(ha({doRedirect:e})):e()}break;case"RESET_TO_THUMBNAIL":yield*so((0,ee.hz)({})),yield*so(Fn({isVisible:!0})),yield*so($t(!0)),yield*so(Jt(t.thumbnail))}}function*ya(){yield*ao(ee.Wn,va)}Object.defineProperty(va,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playEndedSaga.ts",lineNumber:21,code:null}}),Object.defineProperty(ya,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playEndedSaga.ts",lineNumber:116,code:null}});const ba=e=>e.videoControls.isClickForSoundVisible,Ea=e=>!e.videoControls.areControlsDisabled&&(e.videoControls.areControlsVisible||e.videoControls.controlsStayVisibleBy.length>0),Sa=e=>{const t=!e.videoState.paused&&Ho(e),n=Boolean(e.miscScreenObjects.alternativeDurationLine),r=Uo(e).some((e=>"quiz"===e.type));return Ea(e)&&!t&&!n&&!Yo(e)&&!r},Aa=["button","grid","survey","shareGate","turnstile","email","quiz"],wa=e=>{if(!e.videoState.isPlayRequested)return!0;const{highlightedItemId:t}=e.videoItemsOnScreen,n=Uo(e),r=e.sourceConfiguration?.current?.playerConfig;return!(!r||!n.some((e=>Boolean(Aa.includes(e.type)))))||(!(!t||t===da)||Ea(e))},_a=e=>e.videoControls.areShortcutsDisabled;var Ta=/iPhone/i,Oa=/iPod/i,Ia=/iPad/i,xa=/\biOS-universal(?:.+)Mac\b/i,Ca=/\bAndroid(?:.+)Mobile\b/i,ka=/Android/i,Ra=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,La=/Silk/i,Na=/Windows Phone/i,Pa=/\bWindows(?:.+)ARM\b/i,Da=/BlackBerry/i,Ba=/BB10/i,Ma=/Opera Mini/i,Fa=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ua=/Mobile(?:.+)Firefox\b/i,ja=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};const{isChrome:Ha,isEdge:Va,isFirefox:Ga,isIE:za,isOpera:Xa,isSafari:Wa,isSSR:Qa}=(()=>{if("undefined"==typeof window)return{isOpera:!1,isIE:!1,isFirefox:!1,isEdge:!1,isChrome:!1,isSafari:!1,isSSR:!0};const e=!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,t="undefined"!=typeof InstallTrigger,n="[object SafariRemoteNotification]"===(!window.safari||void 0!==window.safari&&window.safari.pushNotification).toString()||navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS")&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=!!document.documentMode,i=!r&&(!!window.StyleMedia||window.navigator.userAgent.indexOf("Edg")>-1),o=!!window.chrome;return{isOpera:e,isFirefox:t,isSafari:n,isIE:r,isEdge:i,isChrome:window.navigator.userAgent.match("CriOS")||o&&(!!window.chrome.webstore||!!window.chrome.runtime||"Google Inc."===window.navigator.vendor&&!e&&!i),isSSR:!1}})(),qa=!Qa&&!!window.chrome,Ka="undefined"==typeof window,Ya=!Ka&&function(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=t.userAgent,r=n.split("[FBAN");void 0!==r[1]&&(n=r[0]),void 0!==(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(e){return function(t){return t.test(e)}}(n),o={apple:{phone:i(Ta)&&!i(Na),ipod:i(Oa),tablet:!i(Ta)&&(i(Ia)||ja(t))&&!i(Na),universal:i(xa),device:(i(Ta)||i(Oa)||i(Ia)||i(xa)||ja(t))&&!i(Na)},amazon:{phone:i(Ra),tablet:!i(Ra)&&i(La),device:i(Ra)||i(La)},android:{phone:!i(Na)&&i(Ra)||!i(Na)&&i(Ca),tablet:!i(Na)&&!i(Ra)&&!i(Ca)&&(i(La)||i(ka)),device:!i(Na)&&(i(Ra)||i(La)||i(Ca)||i(ka))||i(/\bokhttp\b/i)},windows:{phone:i(Na),tablet:i(Pa),device:i(Na)||i(Pa)},other:{blackberry:i(Da),blackberry10:i(Ba),opera:i(Ma),firefox:i(Ua),chrome:i(Fa),device:i(Da)||i(Ba)||i(Ma)||i(Ua)||i(Fa)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator),Za=!Ka&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,Ja=!Ka&&navigator.vendor.indexOf("Apple")>-1&&(Ya&&Ya.apple.device||Za),$a=Boolean(Ya&&Ya.phone);let es;const ts=()=>Wa||Ja||navigator.userAgent.indexOf(" UCBrowser/")>=0||!qa&&(()=>{if(void 0!==es)return es;const e=document.createElement("video");return es=Boolean(e.canPlayType("application/vnd.apple.mpegURL")||e.canPlayType("audio/mpegurl")),e.remove(),es})();function*ns(e){yield*go(e),(0,Io.Ut)(yield*ho())||(yield*so(Bn()))}function*rs(e){if(!e.payload.ch)return;let t,n=!1;const r=e.payload.playerMode===ie.V.MINI_PLAYER;let i=!r;for(;;){const{event:o}=yield*yo({event:io(e.payload.ch),playStarted:io(ee.K)});if(i&&!Ea(yield*ho())&&(yield*so(Dn())),"doubleClick"===o?.type&&"overlay"===o.initiatedBy){const e=(0,bo.it)(yield*ho());if(e?.controls.showFullscreenButton){const e=(0,la.yz)(yield*ho());yield*so(Xt(!e)),$a&&!o?.controlPanelVisibilityHistory.at(-2)&&(yield*so((0,ee.D0)({})))}}!i&&setTimeout((()=>{i=!0}),200),"controlBar"===o?.initiatedBy&&("enter"!==o.type||$a||(n=!0),"leave"===o.type&&(n=!1)),t&&t.cancel(),n||(t=yield*uo(ns,!o||"enter"!==o.type&&"move"!==o.type&&"click"!==o.type?150:r?500:2500))}}function*is(){yield*ao(Un,rs)}Object.defineProperty(ns,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoControls/controlVisibilitySaga.ts",lineNumber:31,code:null}}),Object.defineProperty(rs,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoControls/controlVisibilitySaga.ts",lineNumber:39,code:null}}),Object.defineProperty(is,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoControls/controlVisibilitySaga.ts",lineNumber:117,code:null}});const os=async(e,t,n=500)=>new Promise((r=>{const i=(new Date).getTime(),o=e.getMuted();e.pauseReportingVolumeChanges(),e.setMuted(!0),e.seekAndBuffer(t,(()=>{const t=(new Date).getTime()-i;setTimeout((()=>{o||e.setMuted(!1),e.resumeReportingVolumeChanges(),r(void 0)}),Math.max(n-t,0))}),!0)})),as=async(e,t)=>{try{return await e.play(t),"ok"}catch(n){return"error"}};function*ss(e,t){void 0!==t&&(yield*so((0,ee.ze)({time:t,initiatedBy:"playWith",type:"toTime"}))),yield*lo(as,e)}function*ls(e){e.getIsPlaying()?e.pause():yield*lo(as,e)}function us(e){e.getIsMuted()?e.setMuted(!1):e.setMuted(!0)}function*cs(e,t){if((0,bo.Zh)(yield*ho())||(0,Io.SN)(yield*ho()))return;const{hasStarted:n,isPlayRequested:r,currentTime:i}=(0,Io.yf)(yield*ho());if(n||r){if(!n&&r&&!(0,Io.TG)(yield*ho()))return}else Ja||(yield*lo(os,e,i));yield*lo(ss,e,t.payload.time)}function*ds(e,t){if((0,bo.Zh)(yield*ho()))return;const n=(0,bo.m2)(yield*ho());"overlayClick"!==t.payload.initiatedBy||n===ie.V.MINI_PLAYER||Ea(yield*ho())||!$a?e.pause():yield*so(Dn())}function*fs(e,t){if((0,bo.Zh)(yield*ho()))return;let n;const r=e.getDuration()||(0,bo.hn)(yield*ho())?.metadata.duration;if(r){if("toTime"===t.payload.type)n=Math.min(r,Math.max(t.payload.time,0));else if("relative"===t.payload.type){const i=e.getCurrentTime()+t.payload.bySeconds;n=Math.min(r,Math.max(i,0))}else n=r*(t.payload.percent/100);void 0!==n&&(yield*so((0,ee.Zu)({initiatedBy:t.payload.initiatedBy,toTime:n,currentTime:(0,Io.Xn)(yield*ho())})),e.seek(n))}else console.error("[voomly-embed-player] Failed to get duration, skipping seek")}function hs(e,t){if("mute"===t.payload.type)e.setMuted(t.payload.mute),e.setVolume(t.payload.volume??e.getVolume());else if("absoluteVolume"===t.payload.type)e.setMuted(!1),e.setVolume(t.payload.volume);else if("relativeVolume"===t.payload.type){const n=e.getVolume()+t.payload.byPercent/100,r=Math.min(1,Math.max(n,0));r>0&&e.setMuted(!1),e.setVolume(r)}}function*ps(e,t){const n=!!(0,bo.CQ)(yield*ho()),r=wo(yield*ho());let i=t.payload.muted,o=e.getVolume()??1;if(n&&(i=r.muted??i,o=r.volume??o),i)yield*so((0,ee.A9)({mute:!0,volume:o,by:"autoplay",type:"mute"})),yield*lo(as,e,!0);else{yield*so((0,ee.A9)({volume:o,type:"absoluteVolume"}));"error"===(yield*lo(as,e,!0))&&(yield*so((0,ee.A9)({mute:!0,volume:o,by:"autoplay",type:"mute"})),yield*lo(as,e,!0))}const a=Jo(yield*ho());a?.fromEmitter.videoAutoplay.emit()}function*ms(e,t){yield*lo((()=>new Promise((n=>{e.seekAndBuffer(t.payload.time,(()=>{n()}))})))),t.payload.doubleSeek&&e.seek(t.payload.time)}function*gs(e,t){Ja||(yield*lo(os,e,t.payload.time)),yield*so((0,ee.Vt)({time:t.payload.time,initiatedBy:t.payload.initiatedBy}))}function vs(e,t){e.setSpeed(t.payload.value)}function ys(e,t){e.setQuality(t.payload.quality,t.payload.hlsUrl)}function*bs(e,t){const n=yield*ho();(0,la.FL)(n)&&Ja&&e.setIsFullscreen(t.payload)}function*Es(e){yield*oo(ee.ET,us,e.payload.api),yield*oo(ee._9,ls,e.payload.api),yield*oo(ee.D0,cs,e.payload.api),yield*oo(ee.hz,ds,e.payload.api),yield*oo(ee.ze,fs,e.payload.api),yield*oo(ee.A9,hs,e.payload.api),yield*oo(ee.fY,ps,e.payload.api),yield*oo(ee.Sp,ms,e.payload.api),yield*oo(ee.AI,gs,e.payload.api),yield*oo(ee.YF,vs,e.payload.api),yield*oo(ee.kT,ys,e.payload.api),yield*oo(Xt,bs,e.payload.api)}function*Ss(){yield*ao(ee.$G,Es)}function*As(e){const t=e(yield*ho());for(;;){yield*io();const n=e(yield*ho());if(t!==n)return n}}function*ws(e){const t=e(yield*ho());for(;;){yield*io();const n=e(yield*ho());if(t!==n)return[t,n]}}function _s(e,t,...n){return uo(Object.defineProperty((function*(){let r=e(yield*ho()),i=yield*uo(t,...n,e(yield*ho()));for(;;){yield*io();const o=e(yield*ho());We(r,o)||(yield*fo(i),i=yield*uo(t,...n,e(yield*ho())),r=o)}}),"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/utils.ts",lineNumber:82,code:"function* () {\n let currentValue = selector(yield* select());\n let currentTask: Task = yield* fork(fn as any, ...args, selector(yield* select()));\n\n while (true) {\n yield* take();\n\n const newValue = selector(yield* select());\n\n if (isEqual(currentValue, newValue)) continue;\n\n yield* cancel(currentTask);\n\n currentTask = yield* fork(fn as any, ...args, selector(yield* select()));\n currentValue = newValue;\n }\n }"}}))}Object.defineProperty(ss,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:65,code:null}}),Object.defineProperty(ls,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:73,code:null}}),Object.defineProperty(cs,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:89,code:null}}),Object.defineProperty(ds,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:116,code:null}}),Object.defineProperty(fs,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:140,code:null}}),Object.defineProperty(ps,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:201,code:null}}),Object.defineProperty(ms,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:253,code:null}}),Object.defineProperty(gs,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:271,code:null}}),Object.defineProperty(bs,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:301,code:null}}),Object.defineProperty(Es,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:311,code:null}}),Object.defineProperty(Ss,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/passActionsToVideoApiSaga.ts",lineNumber:328,code:null}}),Object.defineProperty((function*(e,t){for(;;){yield*io();const n=t(yield*ho());if(!We(n,e))return n}}),"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/utils.ts",lineNumber:8,code:null}}),Object.defineProperty(As,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/utils.ts",lineNumber:20,code:null}}),Object.defineProperty(ws,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/utils.ts",lineNumber:33,code:null}});let Ts=function(e){return e.play="play",e.pause="pause",e.playing="playing",e.seek="seek",e.pageView="pageview",e.finish="finish",e}({});let Os=function(e){return e.windows="Windows",e.linux="Linux",e.macos="macOS",e.ios="iOS",e.ipados="iPadOS",e.android="Android",e.other="Other",e}({}),Is=function(e){return e.desktop="Desktop",e.mobile="Mobile",e.tablet="Tablet",e.other="Other",e}({}),xs=function(e){return e.googleChrome="Google Chrome",e.mozillaFirefox="Mozilla Firefox",e.opera="Opera",e.safari="Safari",e.internetExplorer="Internet Explorer",e.microsoftEdge="Microsoft Edge",e.ssr="ssr",e.other="Other",e}({}),Cs=function(e){return e.play="play",e.pause="pause",e.playing="playing",e.seekStarted="seekStarted",e.seekFinished="seekFinished",e.finished="finished",e}({});const ks=!1,Rs={},Ls={[Cs.play]:Ts.play,[Cs.pause]:Ts.pause,[Cs.finished]:Ts.finish,[Cs.playing]:Ts.playing};function*Ns(e,t){let n,r,i,o;for(;;){const a=yield*io(e);if(a.config.id!==n&&(n=a.config.id,r=void 0,Rs[n]=Rs[n]??1),a.name===Cs.seekStarted)r={startedAt:a.second},ks&&console.debug("[ANALYTICS] Start seek. Config ID:",a.config.id,a);else if(a.name===Cs.seekFinished&&r){const e=Math.abs(r?.startedAt-a.second)<1;if(!e){const e={name:Ts.seek,fromSecond:Math.floor(r.startedAt),toSecond:Math.floor(a.second),sequenceNumber:Rs[n]++,executedAt:(new Date).toISOString()};ks&&console.debug("[ANALYTICS] Seeked. Config ID:",a.config.id,e),yield*so(t,{ev:e,config:a.config,prevEv:i,prevConfig:o}),i=e,o=a.config}const s={name:(0,Io.ht)(yield*ho())?Ts.play:Ts.pause,sequenceNumber:Rs[n]++,second:Math.floor(e?r.startedAt:a.second),executedAt:(new Date).toISOString()};ks&&console.debug(`[ANALYTICS] ${s.name===Ts.play?"Play":"Pause"} after seek. Config ID:`,a.config.id,s),yield*so(t,{ev:s,config:a.config,prevEv:i,prevConfig:o}),i=s,o=a.config,r=void 0}else if(a.name!==Cs.seekFinished){if(r)continue;if(!Ls[a.name]){console.error(`Don't know how to map event ${JSON.stringify(a)}`);continue}const e={name:Ls[a.name],second:Math.floor(a.second),sequenceNumber:Rs[n]++,executedAt:(new Date).toISOString()};ks&&console.debug(`[ANALYTICS] Original ${e.name}. Config ID:`,a.config.id,e),yield*so(t,{ev:e,config:a.config,prevEv:i,prevConfig:o}),i=e,o=a.config}}}Object.defineProperty(Ns,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsConverterSaga.ts",lineNumber:24,code:null}});var Ps=n(3887);const Ds=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++it||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index};const wl=function(e,t,n){t=t.length?(0,gl.Z)(t,(function(e){return(0,Be.Z)(e)?function(t){return(0,Ks.Z)(t,1===e.length?e[0]:e)}:e})):[sl.Z];var r=-1;t=(0,gl.Z)(t,(0,bl.Z)(dl));var i=vl(e,(function(e,n,i){return{criteria:(0,gl.Z)(t,(function(t){return t(e)})),index:++r,value:e}}));return yl(i,(function(e,t){return Al(e,t,n)}))};const _l=function(e,t,n,r){return null==e?[]:((0,Be.Z)(t)||(t=null==t?[]:[t]),n=r?void 0:n,(0,Be.Z)(n)||(n=null==n?[]:[n]),wl(e,t,n))};var Tl=n(3344),Ol=n(7129);n(9582);const Il=async(e,t,n)=>{if(n){return navigator.sendBeacon(e,JSON.stringify(t))?{success:!0}:{success:!1,error:"Failed to add beacon to queue"}}{const[n,r]=await(0,ue.Z)(Tl.default.post(e,t));if(r)return{success:!0};if(n)return{success:!1,error:n.response?.data};throw new Error("no response or error")}},xl=async({user:e,events:t,byBeacon:n})=>Il((0,Ol.b)("/analytics-v2/events"),{user:e,events:t},!!n),Cl=async({events:e,sessionId:t,byBeacon:n})=>Il((0,Ol.b)(`/analytics-v3/sessions/${t}/events`),e,!!n),kl=async(e,t)=>{const[n,r]=await(0,ue.Z)(Tl.default.post((0,Ol.b)("/analytics-v3/sessions"),{...e,user:t}));if(r)return r.data.id;if(!n)throw new Error("unreachable code")};var Rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ll="undefined"!=typeof window?window.device:void 0,Nl={},Pl=[];"undefined"!=typeof window&&(window.device=Nl);var Dl="undefined"!=typeof window?window.document.documentElement:void 0,Bl="undefined"!=typeof window?window.navigator.userAgent.toLowerCase():void 0,Ml=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"];function Fl(e,t){return-1!==e.indexOf(t)}function Ul(e){return"undefined"!=typeof window&&Fl(Bl,e)}function jl(e){return"undefined"!=typeof window&&Dl.className.match(new RegExp(e,"i"))}function Hl(e){if("undefined"!=typeof window){var t=null;jl(e)||(t=Dl.className.replace(/^\s+|\s+$/g,""),Dl.className=t+" "+e)}}function Vl(e){"undefined"!=typeof window&&jl(e)&&(Dl.className=Dl.className.replace(" "+e,""))}function Gl(){"undefined"!=typeof window&&(Nl.landscape()?(Vl("portrait"),Hl("landscape"),zl("landscape")):(Vl("landscape"),Hl("portrait"),zl("portrait")),Ql())}function zl(e){for(var t=0;t1;return Ul("ipad")||e},Nl.android=function(){return!Nl.windows()&&Ul("android")},Nl.androidPhone=function(){return Nl.android()&&Ul("mobile")},Nl.androidTablet=function(){return Nl.android()&&!Ul("mobile")},Nl.blackberry=function(){return Ul("blackberry")||Ul("bb10")},Nl.blackberryPhone=function(){return Nl.blackberry()&&!Ul("tablet")},Nl.blackberryTablet=function(){return Nl.blackberry()&&Ul("tablet")},Nl.windows=function(){return Ul("windows")},Nl.windowsPhone=function(){return Nl.windows()&&Ul("phone")},Nl.windowsTablet=function(){return Nl.windows()&&Ul("touch")&&!Nl.windowsPhone()},Nl.fxos=function(){return(Ul("(mobile")||Ul("(tablet"))&&Ul(" rv:")},Nl.fxosPhone=function(){return Nl.fxos()&&Ul("mobile")},Nl.fxosTablet=function(){return Nl.fxos()&&Ul("tablet")},Nl.meego=function(){return Ul("meego")},Nl.cordova=function(){return window.cordova&&"file:"===location.protocol},Nl.nodeWebkit=function(){return"object"===Rl(window.process)},Nl.mobile=function(){return Nl.androidPhone()||Nl.iphone()||Nl.ipod()||Nl.windowsPhone()||Nl.blackberryPhone()||Nl.fxosPhone()||Nl.meego()},Nl.tablet=function(){return Nl.ipad()||Nl.androidTablet()||Nl.blackberryTablet()||Nl.windowsTablet()||Nl.fxosTablet()},Nl.desktop=function(){return!Nl.tablet()&&!Nl.mobile()},Nl.television=function(){for(var e=0;e1)},Nl.landscape=function(){return"undefined"!=typeof window&&(screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?Fl(screen.orientation.type,"landscape"):Nl.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90===Math.abs(window.orientation):window.innerHeight/window.innerWidth<1)},Nl.noConflict=function(){return"undefined"!=typeof window&&(window.device=Ll),this},"undefined"!=typeof window&&(Nl.ios()?Nl.ipad()?Hl("ios ipad tablet"):Nl.iphone()?Hl("ios iphone mobile"):Nl.ipod()&&Hl("ios ipod mobile"):Nl.macos()?Hl("macos desktop"):Nl.android()?Nl.androidTablet()?Hl("android tablet"):Hl("android mobile"):Nl.blackberry()?Nl.blackberryTablet()?Hl("blackberry tablet"):Hl("blackberry mobile"):Nl.windows()?Nl.windowsTablet()?Hl("windows tablet"):Nl.windowsPhone()?Hl("windows mobile"):Hl("windows desktop"):Nl.fxos()?Nl.fxosTablet()?Hl("fxos tablet"):Hl("fxos mobile"):Nl.meego()?Hl("meego mobile"):Nl.nodeWebkit()?Hl("node-webkit"):Nl.television()?Hl("television"):Nl.desktop()&&Hl("desktop"),Nl.cordova()&&Hl("cordova")),Nl.onChangeOrientation=function(e){"function"==typeof e&&Pl.push(e)};var Xl="resize";function Wl(e){for(var t=0;t{let e="other";return Ha?e="googleChrome":Wa?e="safari":Va?e="microsoftEdge":za?e="internetExplorer":Ga?e="mozillaFirefox":Xa?e="opera":Qa&&(e="ssr"),e},Yl=()=>{let e=Is.other;return ql.tablet()||ql.ipad()?e=Is.tablet:ql.mobile()?e=Is.mobile:ql.desktop()&&(e=Is.desktop),e},Zl=()=>{const e=window.navigator.userAgent,t=window.navigator.platform;let n=Os.other;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n=Os.macos:-1!==["iPhone","iPad","iPod"].indexOf(t)?n=Os.ios:-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n=Os.windows:/Android/.test(e)?n=Os.android:!n&&/Linux/.test(t)&&(n=Os.linux),n};let Jl;const $l={},eu=(e,t)=>($l[e]&&($l[e]=!1),{isFirstVisit:$l[e]??!1,userId:t}),tu=e=>{try{const t=re.A7.getItem(e);if(t)return eu(e,t)}catch(n){if(console.warn("Cannot get value from local storage. Probably using iframe."),Jl)return eu(e,Jl)}const t=Math.random().toString(36).substr(2)+(new Date).getTime();try{re.A7.setItem(e,t)}catch(n){console.warn("Cannot set value to local storage. Probably using iframe."),Jl=t}return $l[e]=!0,{isFirstVisit:!0,userId:t}},nu=e=>{const{isFirstVisit:t,userId:n}=tu(e);return{visitorId:n,firstVisit:t,os:Zl(),device:Yl(),browser:xs[Kl()]??xs.other}},ru=e=>{const t=[];for(const n of e)if(t.push(n),n.name===Ts.finish)break;return t},iu=new Map;function*ou({sessions:e,events:t,byBeacon:n=!1}){const r=[],i=ml(t,(e=>e.config.id));for(const[o,a]of Object.entries(i)){const t=e[o];if(!t.sessionId){r.push(...a);continue}if(0===a.length)continue;const i=t.sessionId,s=ru(a.map((({ev:e})=>{let t=iu.get(i);return t||(t=1,iu.set(i,t)),iu.set(i,t+1),{...e,sequenceNumber:t===e.sequenceNumber?e.sequenceNumber:t}}))),l=yield*lo(Cl,{events:s,sessionId:i,byBeacon:n});if(l.success&&a.find((e=>e.ev.name===Ts.finish))&&(e[o].isFinished=!0),!l.success){e[o].shouldRecreateSession=!0,r.push(...a);const t=iu.get(i);t&&iu.set(i,t-s.length)}}return r}Object.defineProperty(ou,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/eventsSenderSaga.ts",lineNumber:47,code:null}});const au=e=>{const t=ml(e,(e=>e.config.id));let n=[];for(const[,r]of Object.entries(t)){let e,t;const i=_l(r,(e=>e.ev.sequenceNumber),["asc"]).reduce(((n,r)=>(e=r.prevEv,t=r.prevConfig,e&&t?.id===r.config.id?("play"===r.ev.name&&"play"===e.name||"pause"===r.ev.name&&"pause"===e.name||"playing"===r.ev.name&&"pause"===e.name||"finish"===r.ev.name&&"finish"===e.name||n.push(r),n):(n.push(r),n))),[]);n=n.concat(i)}return n};let su,lu=!1;function*uu(){for(;;){const{lastAnalyticsFlushBeforeRedirect:e,lastAnalyticsFlushBeforeUnload:t}=yield*yo({lastAnalyticsFlushBeforeRedirect:io(ha),lastAnalyticsFlushBeforeUnload:io(ma)});if(e){su=e.payload.doRedirect,yield*so(pa());break}if(t){lu=!0,yield*so(pa());break}}}function*cu(e){let t=[];const n={};let r=!1;try{for(;;){const i=yield*po(e);if(su){const e=i.length?i?.[i.length-1]:void 0,t=(0,bo.DP)(yield*ho());if(t&&e?.ev.name!==Ts.finish){const n=(0,Io.Xn)(yield*ho());i.push({ev:{name:Ts.finish,second:Math.ceil(n),sequenceNumber:Rs[t.id]++,executedAt:(new Date).toISOString()},config:t,prevEv:e?.ev,prevConfig:e?.config})}r=!0}const o=[...i,...t],a=ml(o,(e=>e.config.id)),s=[];for(const e of o){let t=n[e.config.id];if(t||(n[e.config.id]={shouldRecreateSession:!0,isFinished:!1,sessionId:void 0},t=n[e.config.id]),!t.sessionId||t.shouldRecreateSession||t.isFinished){if(t.isFinished&&1===a[e.config.id].length&&a[e.config.id][0].ev.name===Ts.playing)continue;t.sessionId=yield*lo(kl,e.config.ids,nu(`player_event_${e.config.id}`)),t.sessionId&&(t.shouldRecreateSession=!1,t.isFinished=!1)}s.push(e)}if(t=yield*lo(ou,{sessions:n,events:au(s),byBeacon:!1}),su&&r){su?.();break}if(lu)break;su||(yield*yo({wait:go(5e3),forceSend:io(pa)}))}}finally{const r=yield*po(e);lo(ou,{sessions:n,events:au([...r,...t]),byBeacon:!0})}}function*du(e){const t={name:Ts.pageView,...J(e.ids,["nodeId"])};yield*lo(xl,{user:nu(`page_view_${e.id}`),events:[t],byBeacon:!1})}function*fu(){let e=(0,bo.DP)(yield*ho());for(e&&(yield*lo(du,e));;){yield*io();const t=(0,bo.DP)(yield*ho());(e||{id:void 0}).id!==t?.id&&(t&&(yield*du(t),e=t))}}function*hu(e,t){let n,r=(0,Io.Xn)(yield*ho());try{for(;;){const{seek:i,playEnd:o}=yield*yo({seek:io([ee.BN,ee.Zu]),timeout:go(500),playEnd:io(ee.Wn)}),a=(0,bo.it)(yield*ho()),s=To(yield*ho());if(!t.ids.nodeId||t.ids.nodeId!==s){if(n&&((new Date).getTime()-n.lastSeekAt>1e3||o))yield*so(e,{name:Cs.seekFinished,second:n.seekTo,config:t}),n=void 0;else if(i)if(n)n={...n,seekTo:i.payload.time,lastSeekAt:(new Date).getTime()};else{const o=(0,bo.OE)(yield*ho());yield*so(e,{name:Cs.seekStarted,second:o??r,config:t}),n={lastSeekAt:(new Date).getTime(),seekFrom:i.payload.time,seekTo:i.payload.time}}if(o&&"LOOP"===a?.general.onEnd.action)break;r=(0,Io.Xn)(yield*ho())}}}finally{n&&(yield*mo())&&(yield*so(e,{name:Cs.seekFinished,second:n.seekTo,config:t}))}}Object.defineProperty(uu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/eventsSenderSaga.ts",lineNumber:165,code:null}}),Object.defineProperty(cu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/eventsSenderSaga.ts",lineNumber:188,code:null}}),Object.defineProperty(du,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/pageViewSender.ts",lineNumber:11,code:null}}),Object.defineProperty(fu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/pageViewSender.ts",lineNumber:25,code:null}}),Object.defineProperty(hu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsTrackerSaga.ts",lineNumber:23,code:null}});const pu=35e3;function*mu(e,t){let n=!1,r=(new Date).getTime();for(;;){const i=(0,bo.it)(yield*ho());if((0,Io.Gd)(yield*ho())&&"LOOP"===i?.general.onEnd.action)break;const o=To(yield*ho());if(t.ids.nodeId&&t.ids.nodeId===o)continue;(new Date).getTime()-r>pu&&(n&&(yield*so(e,{name:Cs.playing,second:Math.ceil((0,Io.Xn)(yield*ho())),config:t})),r=(new Date).getTime(),n=!1);(0,Io.ht)(yield*ho())&&(n=!0),yield*go(1e3)}}Object.defineProperty(mu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsTrackerSaga.ts",lineNumber:103,code:null}});const gu=[ee.x9,ee.K];function*vu(e,t){for(;;){const{onPlayEnd:n,event:r}=yield*yo({onPlayEnd:io(ee.Wn),event:io(gu)}),i=(0,bo.it)(yield*ho());if(n){if("LOOP"===i?.general.onEnd.action)break;continue}const o=Math.ceil((0,bo.OE)(yield*ho())??(0,Io.Xn)(yield*ho()));switch(r?.type){case(0,te.getType)(ee.x9):yield*so(e,{name:Cs.pause,second:o,config:t});break;case(0,te.getType)(ee.K):yield*so(e,{name:Cs.play,second:o,config:t});break;default:console.error(`unrecognized type for event ${JSON.stringify(r)}!`)}}}function*yu(e,t){let n=(0,Io.Xn)(yield*ho());for(;;){const[r]=yield*yo([io(ee.Wn),io("*")]),i=(0,bo.it)(yield*ho());if(r&&(yield*so(e,{name:Cs.finished,second:Math.ceil(n),config:t}),"LOOP"===i?.general.onEnd.action))break;n=(0,Io.Xn)(yield*ho())}}function*bu(e,t){ks&&console.debug("[ANALYTICS] Start tracking. Config ID:",t?.id),t?(yield*uo(hu,e,t),yield*uo(mu,e,t),yield*uo(vu,e,t),yield*uo(yu,e,t)):console.error("Can't track analytics events \u2014 config is undefined")}function*Eu(e){yield*_s(bo.DP,bu,e)}function*Su(e){const t=(0,bo.DP)(yield*ho());if(!t)return;const{visitorId:n}=nu(`player_event_${t.id}`),r={timelineItemId:e.payload.itemId,funnelId:t.ids.funnelId,nodeId:t.ids.nodeId,videoId:t.ids.videoId,visitorId:n,questions:Object.entries(e.payload.answers).map((([e,t])=>({id:e,answers:[t]})))};yield*lo(Tl.default.post,(0,Ol.b)("/analytics-v3/quiz-submissions"),r)}function*Au(){yield*oo(ga,Su)}function*wu(e){if(!e)return;const t=yield Object.defineProperty(Ii(),"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/analyticsRootSaga.ts",lineNumber:22,code:"channel()"}}),n=yield Object.defineProperty(Ii(),"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/analyticsRootSaga.ts",lineNumber:25,code:"channel()"}});yield*uo(Eu,t),yield*uo(Ns,t,n),yield*go(500),yield*uo(uu),yield*uo(cu,n),yield*uo(fu),yield*uo(Au)}function*_u(){yield*_s(bo.Tr,wu)}Object.defineProperty(vu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsTrackerSaga.ts",lineNumber:142,code:null}}),Object.defineProperty(yu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsTrackerSaga.ts",lineNumber:190,code:null}}),Object.defineProperty(bu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsTrackerSaga.ts",lineNumber:218,code:null}}),Object.defineProperty(Eu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsTrackerSaga.ts",lineNumber:239,code:null}}),Object.defineProperty(Su,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/quizAnswersSenderSaga.ts",lineNumber:9,code:null}}),Object.defineProperty(Au,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/eventsSender/quizAnswersSenderSaga.ts",lineNumber:34,code:null}}),Object.defineProperty(wu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/analyticsRootSaga.ts",lineNumber:16,code:null}}),Object.defineProperty(_u,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/analytics/analyticsRootSaga.ts",lineNumber:42,code:null}});const{CancelToken:Tu}=Tl.default;function Ou(e={}){return lo(Object.defineProperty((function*(){const t=Tu.source();try{return yield*lo((e=>(0,ue.Z)(Tl.default.request(e))),{cancelToken:t.token,...e})}finally{(yield*mo())&&t.cancel()}}),"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/utils/src/lib/httpEffects.ts",lineNumber:11,code:"function* () {\n const source = CancelToken.source();\n try {\n // const maybeRetryCall = (fn: any, ...args: any) => withRetry ? retry(3, 2_000, fn, ...args) : call(fn, ...args);\n\n return yield* call((args) => to, AxiosError>(axios.request(args)), {\n cancelToken: source.token,\n ...config,\n });\n } finally {\n if (yield* cancelled()) {\n source.cancel();\n }\n }\n }"}}))}function*Iu(e){const t=(0,bo.FM)(yield*ho()),n=e.payload,r=!!t&&Boolean(t?.file?.id!==n.file.id);if(!r&&n.playerConfig&&[ie.V.TIMELINE_EDITOR,ie.V.THUMBNAIL_EDITOR].includes(n.playerMode)){const e=t?.playerConfig.thumbnail,r=n.playerConfig.thumbnail;We(r,e)||(yield*so($t(!0)),yield*so(Jt(r)),yield*so((0,ee.Pj)({hasStarted:!0})))}if("videoLoop"===n.playerConfig.thumbnail?.type&&n.playerConfig.thumbnail?.customVideoId){const[e,t]=yield*function(e,t={}){return Ou({method:"get",url:e,...t})}((0,Ol.b)(`/videos/${n.playerConfig.thumbnail?.customVideoId}/voomly`)),r=t?.data;!e&&r?yield*so(en(r)):console.error(`Cannot load thumbnail video with id ${n.playerConfig.thumbnail?.customVideoId}`)}if(n.playbackSettings.forceAspectRatio&&(yield*so(Wt(n.playbackSettings.forceAspectRatio))),r)return void(yield*so(On(n)));if((0,bo.Zh)(yield*ho()))return;n.playbackSettings.currentTime!==t?.playbackSettings.currentTime&&n.playbackSettings.currentTime>0&&(0,Io.L6)(yield*ho())&&(yield*so((0,ee.ze)({time:n.playbackSettings.currentTime,type:"toTime"})));const i=t?.playerConfig;if(Boolean(i)){const e=So(yield*ho());e?.isVisible&&(yield*so($t(e.isVisible)),yield*so(Jt(n.playerConfig.thumbnail)));const t=(0,Io.yf)(yield*ho());!t.hasStarted&&n.playerConfig.general.autoplay&&[ie.V.TIMELINE_EDITOR,ie.V.THUMBNAIL_EDITOR].includes(n.playerMode)&&(yield*so((0,ee.D0)({}))),t.hasStarted||(n.playerConfig.controls.visibleControlsOnLoad?yield*so(Dn()):yield*so(Bn()))}else yield*so($t(!0)),yield*so(Jt(n.playerConfig.thumbnail)),yield*so(Fn({isVisible:!0})),n.playerConfig.controls.visibleControlsOnLoad&&(yield*so(Dn())),n.playerConfig.chapters&&n.playerConfig.chapters.enabled&&n.playerConfig.chapters.isVisibleOnLoad&&(yield*so(Bt({isVisible:!0})));yield*so(Tn(n))}function*xu(e){for(;;){const{onTimeChange:t,onPlayEnd:n,onNodeRequest:r}=yield*yo({onTimeChange:As(Io.Xn),onPlayEnd:io(ee.Wn),onNodeRequest:io(kn)});if(t){const n=(0,bo.hn)(yield*ho())?.metadata.duration;e.payload.onTimeChange?.(t,n??t)}n&&e.payload.onVideoFinished?.(),r&&e.payload.onNavigateToOtherNodeRequest?.(r.payload.nodeId,r.payload.timestamp)}}function*Cu(){yield*ao(xn,Iu),yield*ao(Cn,xu)}function*ku(){for(;;){if(yield*io(),(0,bo.Zh)(yield*ho()))continue;const e=Ko(yield*ho()),t=(0,bo.OE)(yield*ho())??(0,Io.Xn)(yield*ho());void 0===e||t1&&(yield*so((0,ee.ze)({time:e,type:"toTime"}))))}}function*Ru(){for(;;){(yield*As(Yo))||(yield*so((0,ee.D0)({})))}}function*Lu(){yield*uo(ku),yield*uo(Ru)}function*Nu(e){const{action:t,initiator:n}=e.payload,{muted:r,volume:i}=(0,Io.yf)(yield*ho());if("openUrl"===t.type){const e=document.createElement("a");e.href=t.url,e.target=t.openInNewTab?"_blank":"_self",e.rel="nofollow noopener noreferrer",e.click()}if("playNode"===t.type&&t.nodeId){const e=(0,bo.Ee)(yield*ho()),o=(0,Io.Xn)(yield*ho());e&&(yield*so(Sn({nodeId:e,timestamp:o}))),yield*so(fn(n.id)),yield*so((0,ee.hz)({isSilent:!0})),yield*so(kn({nodeId:t.nodeId,muted:r,volume:i}))}if("dismiss"===t.type&&(yield*so(dn({id:n.id,remember:!1}))),"unpauseVideo"===t.type){if("grid"===n.type||"survey"===n.type){const[e]=n.id.split("|");yield*so(dn({id:e,remember:!1}))}else"quiz"===n.type&&(yield*so(dn({id:n.id,remember:!1})));yield*so((0,ee.D0)({}))}}function*Pu(e){const{item:t}=e.payload,n=Jo(yield*ho());if((0,bo.Zh)(yield*ho()))console.warn("Can't handle item click while video is changing");else if(xo(t)){switch(t.type){case"button":n?.fromEmitter.timelineButtonClick.emit(t);break;case"image":n?.fromEmitter.timelineImageClick.emit(t);break;case"annotation":n?.fromEmitter.timelineAnnotationClick.emit(t);break;case"imageAnnotation":n?.fromEmitter.timelineImageAnnotationClick.emit(t);break;case"grid":n?.fromEmitter.timelineGridClick.emit(t);break;case"survey":n?.fromEmitter.timelineSurveyClick.emit(t)}const{actionOnClick:r}=e.payload.item;yield*so(pn({initiator:t,action:r}))}}function*Du(){yield*ao(hn,Pu),yield*ao(pn,Nu)}Object.defineProperty(Iu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/sourceConfiguration/sourceConfigurationSaga.ts",lineNumber:23,code:null}}),Object.defineProperty(xu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/sourceConfiguration/sourceConfigurationSaga.ts",lineNumber:154,code:null}}),Object.defineProperty(Cu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/sourceConfiguration/sourceConfigurationSaga.ts",lineNumber:188,code:null}}),Object.defineProperty(ku,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playBlockerSaga.ts",lineNumber:11,code:null}}),Object.defineProperty(Ru,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playBlockerSaga.ts",lineNumber:35,code:null}}),Object.defineProperty(Lu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playBlockerSaga.ts",lineNumber:44,code:null}}),Object.defineProperty(Nu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemsActionsSaga.ts",lineNumber:23,code:null}}),Object.defineProperty(Pu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemsActionsSaga.ts",lineNumber:96,code:null}}),Object.defineProperty(Du,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemsActionsSaga.ts",lineNumber:152,code:null}});const Bu=300;function*Mu(e){if(void 0===e.payload)return;const t=(new Date).getTime();for(;;){const{toggle:n}=yield*yo({timeout:go(Bu,!0),toggle:io(bn)});if(n&&void 0===n.payload)break;const r=((new Date).getTime()-t)/(1e3*e.payload.duration)*100;r>100?(yield*so(En(100)),yield*go(300),yield*so((0,ee.D0)({})),yield*so(dn({id:e.payload.triggeredByItemId,remember:!1})),yield*so(bn(void 0))):yield*so(En(r))}}function*Fu(){yield*ao(bn,Mu)}Object.defineProperty(Mu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/miscScreenObjects/alternativeDurationLineSaga.ts",lineNumber:11,code:null}}),Object.defineProperty(Fu,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/miscScreenObjects/alternativeDurationLineSaga.ts",lineNumber:51,code:null}});const Uu=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1};const zu=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=200&&(o=Ae,a=!1,t=new Ee(t));e:for(;++i{if(Co(e))return{id:e.id,type:e.type,actionsOnEnter:e.actionsOnEnter}},Ju=e=>{if(ko(e))return{id:e.id,type:e.type,actionsOnPreExit:e.actionsOnPreExit}},$u=e=>({id:e.id,type:e.type}),ec=e=>{const t=e.find((e=>"grid"===e.type||(e=>"survey"===e.type)(e)||(e=>"quiz"===e.type)(e)));if(t&&t.actionsOnEnter.find((e=>"pause"===e.type))&&t.pauseAutoResumeIn>0&&!t.isRequired)return t};function*tc(e){const t=Jo(yield*ho());e.some((e=>"shareGate"===e.type||"turnstile"===e.type||!!Co(e)&&e.actionsOnEnter.some((e=>"pause"===e.type))))&&(yield*so((0,ee.hz)({})));const n=ec(e),r=(0,bo.m2)(yield*ho());r&&[ie.V.NORMAL,ie.V.PLAYER_PREVIEW].includes(r)&&n&&(yield*so(bn({color:15938754,percents:0,duration:n.pauseAutoResumeIn,triggeredByItemId:n.id,startAtTime:n.startSecond}))),e.forEach((e=>{if(Zu(e))switch(e.type){case"button":t?.fromEmitter.timelineButtonEnter.emit(e);break;case"image":t?.fromEmitter.timelineImageEnter.emit(e);break;case"grid":t?.fromEmitter.timelineGridEnter.emit(e);break;case"survey":t?.fromEmitter.timelineSurveyEnter.emit(e);break;case"quiz":t?.fromEmitter.timelineQuizEnter.emit(e)}}))}function*nc(e){const t=Jo(yield*ho()),n=(0,bo.m2)(yield*ho());n&&[ie.V.NORMAL,ie.V.PLAYER_PREVIEW].includes(n)&&ec(e)&&(yield*so(bn(void 0))),e.forEach((e=>{if($u(e))switch(e.type){case"button":t?.fromEmitter.timelineButtonExit.emit(e);break;case"image":t?.fromEmitter.timelineImageExit.emit(e);break;case"grid":t?.fromEmitter.timelineGridExit.emit(e);break;case"survey":t?.fromEmitter.timelineSurveyExit.emit(e);break;case"quiz":t?.fromEmitter.timelineQuizExit.emit(e)}}))}function*rc(e){const t=Jo(yield*ho());e.some((e=>!!ko(e)&&e.actionsOnPreExit.some((e=>"pause"===e.type))))&&(yield*so((0,ee.hz)({}))),e.forEach((e=>{if(Ju(e))switch(e.type){case"button":t?.fromEmitter.timelineButtonPreExit.emit(e);break;case"image":t?.fromEmitter.timelineImagePreExit.emit(e);break;case"grid":t?.fromEmitter.timelineGridPreExit.emit(e);break;case"survey":t?.fromEmitter.timelineSurveyPreExit.emit(e)}}))}function*ic(){for(;;){yield*io();const[e,t]=yield*ws(Uo),n=Yu(t,e),r=Yu(e,t);yield*tc(n),yield*nc(r)}}function*oc(){let e=[];for(;;){yield*io();const t=Uo(yield*ho()),n=t.map((({id:e})=>e)),r=(0,Io.Xn)(yield*ho()),i=t.filter((t=>t.endSecond-1<=r&&r<=t.endSecond&&!e.includes(t.id)));yield*rc(i),e.push(...i.map((({id:e})=>e))),e=e.filter((e=>n.includes(e)))}}function*ac(){yield*uo(ic),yield*uo(oc)}Object.defineProperty(tc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemLifecycleSaga.ts",lineNumber:92,code:null}}),Object.defineProperty(nc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemLifecycleSaga.ts",lineNumber:155,code:null}}),Object.defineProperty(rc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemLifecycleSaga.ts",lineNumber:198,code:null}}),Object.defineProperty(ic,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemLifecycleSaga.ts",lineNumber:240,code:null}}),Object.defineProperty(oc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemLifecycleSaga.ts",lineNumber:257,code:null}}),Object.defineProperty(ac,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoItems/itemLifecycleSaga.ts",lineNumber:282,code:null}});var sc=n(2779),lc=n.n(sc);const uc=(e,t,n)=>{const r=t.bgColors?t.bgColors[e]:void 0,i=t.colors?t.colors[e]:void 0,o=t.stroke?t.stroke[e]:void 0,a=t.bgGradient?t.bgGradient[e]:void 0;return{backgroundColor:r?r(n,!0):void 0,backgroundImage:a?a(n):void 0,color:i?i(n):void 0,stroke:o?o(n):void 0}},cc="popoverTip_root__d4G8D",dc=({className:e,skin:t,config:n})=>(0,ae.jsx)("div",{className:lc()(e,cc,t.classes.controls__popoverTip),style:uc("controls__popoverTip",t,n)}),fc=(0,i.memo)(dc),hc="button_root__k-WRg",pc="button_isHovered__VxbIy";var mc=n(7573);const gc=({config:e,className:t,style:n,icon:r,isHovered:o,title:a,onClick:s,dataCy:l,...u})=>{const c=(0,mc.tg)(),d=(0,i.useCallback)((e=>{e.stopPropagation(),s?.(e)}),[s]);return(0,ae.jsx)("button",{"data-cy":l,type:"button",...u,onClick:d,className:lc()(hc,c.classes.button__root,t,{[pc]:o}),style:{...uc("button__root",c,e),...n},title:a,children:r})},vc="select_root__j+g17",yc="select_popover__O4fHk",bc="select_withTip__FY7uK",Ec="select_opened__9me0R",Sc="select_select__wIYN0",Ac="select_option__86kb5",wc="select_selected__UBPPk",_c="select_icon__jPlri",Tc="select_label__8E-dl",Oc=["mousedown","touchstart"],Ic=(e,t,n=[],r=Oc)=>{const o=(0,i.useRef)(t);o.current=t,(0,i.useEffect)((()=>{const t=t=>{const{current:r}=e,i=t.target;i.shadowRoot&&n.includes(i.shadowRoot)||!r||r.contains(i)||o.current(t)};for(const e of r)document.addEventListener(e,t),n.forEach((n=>n.addEventListener(e,t)));return()=>{for(const e of r)document.removeEventListener(e,t),n.forEach((n=>n.removeEventListener(e,t)))}}),[r,e,n])},xc=({className:e,buttonProps:t,config:n,options:r,selectedValue:o,onSelect:a,onChangeOpen:s,dataCy:l})=>{const u=(0,i.useRef)(null),c=(0,mc.tg)(),[d,h]=(0,i.useState)(!1),p=I();(0,i.useEffect)((()=>{s?.(d)}),[d,s]);const m=(0,i.useMemo)((()=>p.insideShadowDom?[p.shadowRoot,...p.connectedPortals.map((e=>e.shadowRoot))]:[]),[p.insideShadowDom,p.shadowRoot,p.connectedPortals]);Ic(u,(()=>{h(!1)}),m);const g=(0,i.useCallback)(((e,t)=>{t.stopPropagation(),a(e),h(!1)}),[a]),v=(0,i.useCallback)((e=>{e.stopPropagation(),h(!d)}),[d]);return(0,ae.jsxs)("div",{ref:u,className:lc()(vc,e),children:[r.length>0?(0,ae.jsx)("div",{className:lc()(yc,c.classes.controls__popover,{[bc]:Boolean(c.tips),[Ec]:d,[c.classes.controls__popoverOpened]:c.classes.controls__popoverOpened&&d}),style:uc("controls__popover",c,n),children:(0,ae.jsxs)("div",{className:lc()(Sc,c.classes.select),children:[r.map((({value:e,label:t})=>{const r=e===o,i=lc()(Ac,c.classes.controls__selectOption,{[wc]:r,[c.classes.controls__selectedOption]:r}),a={...uc("controls__selectOption",c,n),...r?uc("controls__selectedOption",c,n):{}};return(0,ae.jsxs)("span",{"data-cy":"select-option-"+t,className:i,style:a,onClick:t=>g(e,t),children:[(0,ae.jsx)("span",{className:_c}),(0,ae.jsx)("span",{className:Tc,children:t})]},e)})),c.tips&&(0,ae.jsx)(fc,{skin:c,config:n})]})}):null,(0,ae.jsx)(gc,{dataCy:l,...t,onClick:v})]})},Cc="styles_selectSpeedWrap__VfqPu",kc="styles_selectSpeedDropdown__wpsEl",Rc=Ja?[.5,1,1.5,2]:[.5,1,1.5,2,2.5],Lc=({player:e,player:{skin:{captions:t}}})=>{const n=(0,de.I0)(),r=(0,de.v9)(Io.zP),o=(0,mc.tg)(),a=(0,i.useCallback)((e=>{n(e?Nn("SELECT_SPEED"):Pn("SELECT_SPEED"))}),[n]),s=(0,i.useMemo)((()=>Rc.map((e=>({value:e,label:1===e?t.normalSpeedText:`${e}x`})))),[t.normalSpeedText]),l=(0,i.useMemo)((()=>{const n=o.icons.speed;return{config:e,icon:(0,ae.jsx)(n,{}),title:t.playbackSpeedText}}),[t.playbackSpeedText,e,o]),u=(0,i.useCallback)((e=>{n((0,ee.YF)({value:e}))}),[n]);return e.controls.showSelectSpeedButton?(0,ae.jsx)("div",{className:Cc,children:(0,ae.jsx)(xc,{dataCy:"selectSpeed-button",className:lc()(o.classes.selectSpeed__root,kc),buttonProps:l,config:e,options:s,selectedValue:r,onSelect:u,onChangeOpen:a})}):null},Nc=(0,i.memo)(Lc),Pc={selectQualityWrap:"styles_selectQualityWrap__OxDH1",selectQualityDropdown:"styles_selectQualityDropdown__QGX9f"},Dc=e=>(e.qualityOptions||[]).sort(((e,t)=>t.height-e.height)).map(((e,t)=>({label:e.label,value:t,hlsUrl:e.hlsUrl}))).concat([{label:"Auto",hlsUrl:e.url||"",value:-1}]),Bc=({player:e,file:t,player:{skin:{captions:n}}})=>{const r=(0,de.I0)(),o=(0,de.v9)(Io.Ed),a=(0,mc.tg)(),s=(0,i.useCallback)((e=>{r(e?Nn("SELECT_QUALITY"):Pn("SELECT_QUALITY"))}),[r]),l=(0,i.useMemo)((()=>Dc(t)),[t]),u=(0,i.useCallback)((e=>{const n=-1===e?t.url||"":t.qualityOptions?.[e].hlsUrl;n&&r((0,ee.kT)({quality:e,hlsUrl:n}))}),[r,t.qualityOptions,t.url]),c=(0,i.useMemo)((()=>{const t=a.icons.quality;return{config:e,icon:(0,ae.jsx)(t,{}),title:n.qualityText}}),[n.qualityText,e,a]);return!e.controls.showSelectQualityButton||l.length<=2?null:(0,ae.jsx)("div",{className:Pc.selectQualityWrap,children:(0,ae.jsx)(xc,{className:lc()(a.classes.selectQuality__root,Pc.selectQualityDropdown),buttonProps:c,config:e,options:l,selectedValue:o,onSelect:u,onChangeOpen:s,dataCy:"selectQuality-button"})})},Mc=(0,i.memo)(Bc);function Fc(e){e?.videoPlayStarted.emit()}function Uc(e){e?.videoPaused.emit()}function jc(e,t){e?.videoSeekStarted.emit({time:t.payload.toTime})}function Hc(e,t){e?.videoSeeked.emit({time:t.payload.time})}function Vc(e,t){e?.qualityChanged.emit({quality:t.payload.quality})}function Gc(e,t){e?.volumeChanged.emit({volume:t.payload.volume,muted:t.payload.muted})}function zc(e,t){e?.speedChanged.emit({speed:t.payload})}function Xc(e,t){e?.timeUpdate.emit({time:t.payload.newTime})}function*Wc(e,t){const n=(0,Io.zP)(yield*ho());e?.speedOptions.emit({options:Rc,current:n})}function*Qc(e,t){const n=(0,bo.hn)(yield*ho()),r=(0,Io.Ed)(yield*ho());n&&e?.qualityOptions.emit({options:Dc(n),current:r})}function qc(e,t){e?.updateDimensions.emit(t.payload)}function*Kc(e){const t=e.payload.api?.fromEmitter;yield*ao(ee.K,Fc,t),yield*ao(ee.x9,Uc,t),yield*ao(ee.Zu,jc,t),yield*ao(ee.BN,Hc,t),yield*ao(ee.gp,Vc,t),yield*ao(ee.ni,Gc,t),yield*ao(ee.yj,zc,t),yield*ao(ee.b3,Xc,t),yield*ao(ee.wE,Wc,t),yield*ao(ee.wV,Qc,t),yield*ao(Gt,qc,t)}function*Yc(){yield*ao(ee.u7,Kc)}Object.defineProperty(Wc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playerEventsSaga.ts",lineNumber:73,code:null}}),Object.defineProperty(Qc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playerEventsSaga.ts",lineNumber:82,code:null}}),Object.defineProperty(Kc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playerEventsSaga.ts",lineNumber:105,code:null}}),Object.defineProperty(Yc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/videoState/sagas/playerEventsSaga.ts",lineNumber:121,code:null}});const Zc=(0,te.createStandardAction)("root/CANCEL_SPAWN_TASKS")();function*Jc(){yield*uo(Object.defineProperty((function*(){yield*vo([Fu(),Cu(),Ss(),ta(),ya(),ca(),sa(),is(),Du(),Lu(),ac()])}),"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/rootSaga.ts",lineNumber:18,code:"function* () {\n yield* all([\n alternativeDurationLineSaga(),\n sourceConfigurationSaga(),\n passActionsToVideoApiSaga(),\n initialVideoReadySaga(),\n playEndedSaga(),\n playbackSettingsChangeSaga(),\n nextVideoSaga(),\n controlVisibilitySaga(),\n itemsActionsSaga(),\n playBlockerSaga(),\n itemLifecycleSaga(),\n ]);\n }"}}));const e=yield*co(_u),t=yield*co(Yc);yield*io(Zc),yield*fo([e,t])}Object.defineProperty(Jc,"@@redux-saga/LOCATION",{value:{fileName:"../../../libs/player/src/lib/store/rootSaga.ts",lineNumber:17,code:null}});const $c={muted:void 0,volume:void 0,wasChaptersToggled:!1,stopAnalyticsNodeId:void 0},ed=(e=$c,t)=>{switch(t.type){case(0,te.getType)(kn):return{...e,...t.payload};case(0,te.getType)(Bt):return{...e,wasChaptersToggled:"click"===t.payload.initiatedBy};case(0,te.getType)(na):return{...e,stopAnalyticsNodeId:t.payload.nodeId}}return e},td={turnstile:!1},nd=(e=td,t)=>t.type===(0,te.getType)(ne)?{...e,turnstile:!0}:e,rd={key:"voomly_rememberedDismissedItemIdsConfig_prod",storage:kt.Z,whitelist:["rememberedDismissedItemIds"]},id={key:"key_doesnt_exist",storage:kt.Z,whitelist:["key_doesnt_exist"]},od=e=>t=>{t&&"ALL"===t.type?(0,de.dC)((()=>e(t))):e(t)},ad=e=>{const t="object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({latency:0,trace:!0,traceLimit:25,name:"Player Store",actionsDenylist:["videoState/TIME_UPDATED"],actionSanitizer:e=>"type"in e&&e.type===(0,te.getType)(ee.$G)?{...e,payload:{...e.payload,api:""}}:e}):et,n=Zi({effectMiddlewares:[od]}),r=Je((e=>{const t=nt().v4();return $e({storeId:()=>t,videoState:Lt,chapters:Ft,ctaFooter:Dt,subtitles:Vt,dimensions:Zt,thumbnail:nn,playPauseOverlay:sn,askToResumeOnVisitOverlay:cn,videoItemsOnScreen:wt(e?rd:id,vn),funnelState:ed,miscScreenObjects:_n,sourceConfiguration:Ln,videoControls:Xn,customIntegrations:nd})})(e),t(function(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Qe(15))};const a={getState:i.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map((e=>e(a)));return o=et(...s)(i.dispatch),{...i,dispatch:o}}}(n))),i=n.run(Jc),o=function(e,t,n){var r=n||!1,i=Je(Ct,xt,t&&t.enhancer?t.enhancer:void 0),o=function(e){i.dispatch({type:ut,key:e})},a=function(t,n,o){var a={type:ot,payload:n,err:o,key:t};e.dispatch(a),i.dispatch(a),r&&s.getState().bootstrapped&&(r(),r=!1)},s=Ot({},i,{purge:function(){var t=[];return e.dispatch({type:lt,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:it,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:at})},persist:function(){e.dispatch({type:st,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}(r),a=()=>{r.dispatch(ma())};return window.addEventListener("beforeunload",a),{store:r,persistor:o,dispose:()=>{window.removeEventListener("beforeunload",a),r.dispatch(Zc()),i.cancel()}}};var sd=n(7894),ld=n(9288);const ud=e=>{const t=(0,de.I0)(),n=(0,de.v9)(Io.F3),r=(0,de.v9)(Xo),o=(0,de.v9)(_a),a=(0,de.v9)(Yo),s=(0,i.useRef)(!1);Ic(e,(()=>{s.current=!1}));const l=(0,i.useCallback)((e=>{if((()=>{try{const e=document.activeElement;if(e&&void 0!==e.selectionStart||e&&e.isContentEditable)return!0}catch(e){}return!1})())return!1;if(a||o)return;const r=/Digit([0-9])/gi.exec(e)?.[1];return void 0!==r?(t((0,ee.ze)({type:"percent",percent:10*parseInt(r,10)})),!0):"ArrowRight"===e?(t((0,ee.ze)({type:"relative",bySeconds:5})),!0):"ArrowLeft"===e?(t((0,ee.ze)({type:"relative",bySeconds:-5})),!0):"KeyK"===e?(t((0,ee._9)()),!0):"KeyM"===e?(t((0,ee.ET)()),!0):"KeyL"===e?(t((0,ee.ze)({type:"relative",bySeconds:10})),!0):"KeyJ"===e?(t((0,ee.ze)({type:"relative",bySeconds:-10})),!0):"KeyF"===e?(t(Qt()),!0):"ArrowUp"===e?(t((0,ee.A9)({type:"relativeVolume",byPercent:5})),!0):"ArrowDown"===e?(t((0,ee.A9)({type:"relativeVolume",byPercent:-5})),!0):"Space"===e&&(t((0,ee._9)()),n||t((0,ee.A9)({type:"mute",mute:!1})),!0)}),[t,a,n,o]);(0,i.useEffect)((()=>{const e=e=>{o||(r||!1!==s.current)&&l(e.code)&&e.preventDefault()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[r,l,o]);const u=(0,de.v9)((e=>e.dimensions.isFullScreen)),c=fe(u);(0,i.useEffect)((()=>{!0===c&&!1===u&&e.current&&(s.current=!0)}),[u,c,e]);const d=(0,i.useCallback)((()=>{s.current=!0}),[]);return(0,i.useMemo)((()=>({onMouseDown:d,onTouchStart:d})),[d])};var cd=n(7348);const dd=function(){return cd.Z.Date.now()};var fd=/\s/;const hd=function(e){for(var t=e.length;t--&&fd.test(e.charAt(t)););return t};var pd=/^\s+/;const md=function(e){return e?e.slice(0,hd(e)+1).replace(pd,""):e};var gd=/^[-+]0x[0-9a-f]+$/i,vd=/^0b[01]+$/i,yd=/^0o[0-7]+$/i,bd=parseInt;const Ed=function(e){if("number"==typeof e)return e;if((0,El.Z)(e))return NaN;if((0,zs.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,zs.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=md(e);var n=vd.test(e);return n||yd.test(e)?bd(e.slice(2),n?2:8):gd.test(e)?NaN:+e};var Sd=Math.max,Ad=Math.min;const wd=function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=o}function g(){var e=dd();if(m(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?Ad(n,o-(e-u)):n}(e))}function v(e){return s=void 0,h&&r?p(e):(r=i=void 0,a)}function y(){var e=dd(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?p(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),p(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=Ed(t)||0,(0,zs.Z)(n)&&(c=!!n.leading,o=(d="maxWait"in n)?Sd(Ed(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:v(dd())},y};const _d=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,zs.Z)(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wd(e,t,{leading:r,maxWait:t,trailing:i})},Td=(0,i.createContext)(void 0),Od=({children:e,playerMode:t})=>{const n=(0,de.I0)(),r=(0,i.useRef)(Ii());return(0,i.useEffect)((()=>(n(Un({ch:r.current,playerMode:t})),()=>{n(Un({ch:void 0,playerMode:t}))})),[n,t]),(0,ae.jsx)(Td.Provider,{value:r.current,children:e})},Id=e=>{const t=(0,i.useContext)(Td),n=(0,i.useRef)([]),r=(0,de.v9)(Ea);if(!t)throw new Error("MouseChannelContext value is not present");const o=(0,i.useCallback)(_d((()=>!$a&&t.put({type:"move",initiatedBy:e})),100),[t,e]),a=(0,i.useCallback)((()=>{t.put({type:"doubleClick",initiatedBy:e,controlPanelVisibilityHistory:n.current}),n.current=[]}),[t,e]),s=(0,i.useCallback)((()=>{t.put({type:"click",initiatedBy:e})}),[t,e]),l=(0,i.useCallback)((()=>{n.current.length>1&&(n.current=n.current.slice(-1)),n.current.push(r)}),[r]);return(0,i.useMemo)((()=>({onTouchStart:l,onMouseMove:o,onClick:s,onDoubleClick:a,onMouseLeave:()=>{o.cancel(),t.put({type:"leave",initiatedBy:e})},onMouseEnter:()=>{t.put({type:"enter",initiatedBy:e})}})),[t,s,a,l,e,o])};const xd=function(e,t){var n=(0,i.useRef)((function(){}));(0,i.useEffect)((function(){n.current=e})),(0,i.useEffect)((function(){if(null!==t){var e=setInterval((function(){return n.current()}),t||0);return function(){return clearInterval(e)}}}),[t])};var Cd={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},kd=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],Rd=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],Ld=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],Nd="undefined"!=typeof window&&void 0!==window.document?window.document:{},Pd="fullscreenEnabled"in Nd&&Object.keys(Cd)||kd[0]in Nd&&kd||Rd[0]in Nd&&Rd||Ld[0]in Nd&&Ld||[];const Dd={requestFullscreen:function(e){return e[Pd[Cd.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[Pd[Cd.requestFullscreen]]},get exitFullscreen(){return Nd[Pd[Cd.exitFullscreen]].bind(Nd)},get fullscreenPseudoClass(){return":"+Pd[Cd.fullscreen]},addEventListener:function(e,t,n){return Nd.addEventListener(Pd[Cd[e]],t,n)},removeEventListener:function(e,t,n){return Nd.removeEventListener(Pd[Cd[e]],t,n)},get fullscreenEnabled(){return Boolean(Nd[Pd[Cd.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return Nd[Pd[Cd.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return Nd[("on"+Pd[Cd.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return Nd[("on"+Pd[Cd.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return Nd[("on"+Pd[Cd.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return Nd[("on"+Pd[Cd.fullscreenerror]).toLowerCase()]=e}},Bd={simulatedFullScreenFix:"styles_simulatedFullScreenFix__CcD8y",fullscreenSimulated:"styles_fullscreenSimulated__pjtZl",enabled:"styles_enabled__HPi0w",fullscreen:"styles_fullscreen__NeYKL"},Md={height:"100%",width:"100%"},Fd=()=>Dd.fullscreenElement?Dd.fullscreenElement.shadowRoot?Dd.fullscreenElement.shadowRoot.fullscreenElement:Dd.fullscreenElement:void 0,Ud=({children:e,enabled:t,onChange:n})=>{const r=(0,i.useRef)(null),o=(0,i.useRef)(null),a=(0,i.useCallback)((()=>{Dd.fullscreenEnabled&&r.current&&Dd.requestFullscreen(r.current)}),[]),s=(0,i.useCallback)((()=>{Dd.fullscreenEnabled&&Dd.exitFullscreen()}),[]),l=(0,i.useCallback)((e=>{const t=Fd()===r.current;t&&!e.enabled?s():!t&&e.enabled&&a()}),[a,s]),u=(0,i.useCallback)((()=>{const e=Fd();e===r.current?(o.current=e,n(!0)):!e&&o.current&&(o.current=null,n(!1))}),[n]);return(0,i.useEffect)((()=>(Dd.addEventListener("fullscreenchange",u),()=>{Dd.removeEventListener("fullscreenchange",u)})),[u]),(0,i.useEffect)((()=>{l({children:e,enabled:t,onChange:n})}),[e,t,n,l]),(0,ae.jsx)("div",{"data-cy":"nativeFullScreen",className:lc()(Bd.fullscreen,{[Bd.enabled]:t}),ref:r,style:t?Md:void 0,children:e})},jd=(0,i.memo)(Ud),Hd="voomly-fullscreen-simulated-style",Vd=Dd.fullscreenEnabled,Gd=({children:e})=>{const t=(0,de.I0)(),n=(0,i.useCallback)((e=>{t(Xt(e))}),[t]),r=(0,de.v9)((e=>e.dimensions.isFullScreen));return(0,ae.jsx)(jd,{enabled:r,onChange:n,children:e})},zd=G.ZP.div.withConfig({displayName:"WithFullScreen__SimulatedFullScreenStyled",componentId:"sc-vvh285-0"})(["display:flex;align-items:center;justify-content:center;background-color:#000;"," ",""],(({enabled:e,screenHeight:t})=>e&&(0,G.iv)(["position:fixed;max-width:100vw;width:100%;top:0;left:0;bottom:0;height:","px;transform:translateZ(1000px);z-index:9999999999 !important;"],t)),(({enabled:e})=>!e&&(0,G.iv)(["width:100%;height:100%;overflow:hidden;position:relative;"]))),Xd=({children:e})=>{const t=(0,i.useRef)(null),[n,r]=i.useState(document.documentElement.clientHeight),o=(0,de.v9)((e=>e.dimensions.isFullScreen)),a=fe(o),[s,l]=i.useState(null);return xd((()=>{n!==document.documentElement.clientHeight&&r(document.documentElement.clientHeight)}),o?250:null),i.useEffect((()=>{const e=(()=>{const e=document.getElementById(Hd);if(e)return e;const t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.setAttribute("id",Hd),n.type="text/css",t.appendChild(n),n})();if(e.childNodes.forEach((e=>e.remove())),o){a||l(document.documentElement.scrollTop||document.body.scrollTop);const t="\n html, body {\n background-color: #000;\n overflow: hidden;\n\n max-width: 100vw;\n }\n ";e.appendChild(document.createTextNode(t))}!o&&a&&setTimeout((()=>{document.documentElement.scrollTop=document.body.scrollTop=s||0}),200)}),[o,a,n,s]),(0,i.useEffect)((()=>{if(o&&t.current){const e=[];let n=t.current,r=0;for(;n.parentNode&&n.parentNode!==document.body;)"classList"in n.parentNode&&0!==r&&(e.unshift(n.parentNode),r++),n=n.parentNode;return e.forEach((e=>{e.classList.add(Bd.simulatedFullScreenFix)})),()=>{e.forEach((e=>{e.classList.remove(Bd.simulatedFullScreenFix)}))}}}),[o]),(0,ae.jsx)(zd,{ref:t,enabled:o,screenHeight:window.innerHeight,className:lc()(Bd.fullscreenSimulated,{[Bd.enabled]:o}),children:e})};"undefined"==typeof window||window.simulatedFullscreenObserver||(window.simulatedFullscreenObserver=setInterval((()=>{const e=document.getElementById(Hd);e&&!document.querySelector(`.${Bd.fullscreenSimulated}.${Bd.enabled}`)&&e.childNodes.forEach((e=>e.remove()))}),200));const Wd=({children:e,isNativeFullscreenFallbackEnabled:t})=>t&&!Vd?(0,ae.jsx)("div",{"data-cy":"nativeFullScreen",className:lc()(Bd.fullscreen,{[Bd.enabled]:!1}),style:Md,children:e}):Vd?(0,ae.jsx)(Gd,{children:e}):(0,ae.jsx)(Xd,{children:e}),Qd=({player:e})=>{const t=(0,de.I0)(),n=(0,de.v9)(ra),r=(0,i.useCallback)((()=>{t(Bt({isVisible:!n,initiatedBy:"click"}))}),[t,n]),o=(0,mc.tg)(),a=o.icons.chapters;return e.chapters&&e.chapters.enabled?(0,ae.jsx)(gc,{className:o.classes.toggleChapters__root,config:e,onClick:r,icon:(0,ae.jsx)(a,{}),title:e.chapters.label}):null};var qd=n(5247);const Kd=({player:e})=>{const t=(0,de.I0)(),n=(0,qd.J)(),r=n?.isOpen,o=(0,de.v9)(ra),a=fe(o);(0,i.useEffect)((()=>{o!==a&&o&&n?.setIsOpen(!1)}),[o,a,r,n]);const s=(0,i.useCallback)((()=>{n?.setIsOpen(!r),o&&t(Bt({isVisible:!1,initiatedBy:"click"}))}),[t,o,r,n]),l=(0,mc.tg)(),u=l.icons.videoCollection;return n?(0,ae.jsx)(gc,{className:l.classes.toggleVideoCollection__root,config:e,onClick:s,icon:(0,ae.jsx)(u,{})}):null};var Yd;function Zd(){return Zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Zd({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 23",width:23,height:23,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,Yd||(Yd=i.createElement("path",{fill:"currentColor",d:"M.8 0a1 1 0 0 0-.8.7c0 .4 0 .8.3 1l20 20c.3.3.6.5 1 .4.4-.1.7-.4.8-.8a1 1 0 0 0-.4-1L14.3 13V1.3c0-1.2-1-1.6-2-.7L7.2 5.7 1.7.3A1 1 0 0 0 1 0zm1.5 7a1 1 0 0 0-1 1v6c0 .6.5 1 1 1h3.5l6.5 6.5c1 1 2 .5 2-.9V18L3.3 7h-1z"})))},$d=(0,i.forwardRef)(Jd),ef=(n.p,"clickForSound_root__y4qL1"),tf="clickForSound_button__9-iLT",nf=({player:e,playerMode:t})=>{const{controls:{enableSoundButtonLocation:n,showEnableSound:r},skin:{captions:i}}=e,o=(0,de.I0)(),a=(0,de.v9)(Eo)&&"videoLoop"===e.thumbnail?.type,s=(0,de.v9)(ba)&&t!==ie.V.MINI_PLAYER;if(!r||!s&&!a)return null;const l="top-left"===n?{top:20,left:20}:{top:20,right:-15};return(0,ae.jsx)("div",{"data-cy":"clickForSound",className:ef,onClick:()=>{a&&o((0,ee.D0)({time:0})),o((0,ee.A9)({mute:!1,type:"mute"}))},style:l,children:(0,ae.jsxs)("div",{className:tf,children:[(0,ae.jsx)($d,{}),(0,ae.jsx)("span",{"data-cy":"clickForSound-captions",children:i.enableSoundText})]})})},rf={root:"progressBar_root__XRxQO",tipTime:"progressBar_tipTime__QUM7p",visible:"progressBar_visible__7piiC",tipImage:"progressBar_tipImage__qxaNX",tipTimePopoverTip:"progressBar_tipTimePopoverTip__ujPhs",track:"progressBar_track__WjgQu",funnelArea:"progressBar_funnelArea__c8eQH",funnelAreaIcon:"progressBar_funnelAreaIcon__jJvZY",blockedArea:"progressBar_blockedArea__EWLPa",blockedAreaIconWrapper:"progressBar_blockedAreaIconWrapper__a14m9",barWrap:"progressBar_barWrap__77iho",bar:"progressBar_bar__GwDtx",secondsLoaded:"progressBar_secondsLoaded__MF7gJ",handle:"progressBar_handle__hgNIt",poinerHidden:"progressBar_poinerHidden__vWdTS",disabled:"progressBar_disabled__Nw2if"};var of=n(8610);const af=(e,t)=>{const n={},r=(e=>{let t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};const{body:n,documentElement:r}=document,i=r.clientLeft||n.clientLeft||0,o=window.pageXOffset||n.scrollLeft,a=t.left+o-i,s=r.clientTop||n.clientTop||0,l=window.pageYOffset||n.scrollTop,u=t.top+l-s;return{left:Math.round(a),top:Math.round(u)}})(e),i=e.offsetWidth,o=e.offsetHeight,a=r.top,s=r.left;let l=0,u=0;return"MouseEvent"in window&&t instanceof window.MouseEvent&&(l=t.pageY,u=t.pageX),"TouchEvent"in window&&t instanceof window.TouchEvent&&t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),n.y=0===o?0:Math.max(0,Math.min(1,0===o?0:(a-l+o)/o)),n.x=0===i?0:Math.max(0,Math.min(1,0===i?0:(u-s)/i)),n},sf="slider_slider__Xjf2E";class Slider extends i.Component{constructor(...e){super(...e),this.state={active:!1},this.componentWillUnmount=()=>{this.removeEventListeners()},this.handleMouseMove=e=>{const{onMouseMove:t}=this.props;if(!t)return;t(this.getPosition(e),e)},this.handleMouseDown=e=>{const{onMouseDown:t}=this.props;if(document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("mouseup",this.handleMouseUp,!0),document.addEventListener("touchmove",this.handleMouseMove,!0),document.addEventListener("touchend",this.handleMouseUp,!0),this.setState({active:!0}),this.handleMouseMove(e),!t)return;t(this.getPosition(e),e)},this.handleMouseUp=e=>{const{onMouseUp:t}=this.props;if(this.removeEventListeners(),this.setState({active:!1}),!t)return;t(this.getPosition(e),e)},this.handleClick=e=>{e.stopPropagation(),e.preventDefault()},this.handleLocalMouseMove=e=>{const{onLocalMouseMove:t}=this.props;if(!t)return;t(this.getPosition(e),e)},this.handleLocalMouseLeave=e=>{const{onLocalMouseLeave:t}=this.props;t&&t(e)}}removeEventListeners(){document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("mouseup",this.handleMouseUp,!0),document.removeEventListener("touchmove",this.handleMouseMove,!0),document.removeEventListener("touchend",this.handleMouseUp,!0)}getPosition(e){const t=(0,l.findDOMNode)(this),n=af(t,e instanceof Event?e:e.nativeEvent);return this.props.vertical?n.y:n.x}render(){const{children:e,className:t,style:n}=this.props;return(0,ae.jsx)("div",{"data-cy":"progressBar-slider",tabIndex:0,onMouseMove:this.handleLocalMouseMove,onMouseLeave:this.handleLocalMouseLeave,onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onClick:this.handleClick,className:lc()(t,sf,{vertical:this.props.vertical,sliding:this.state.active}),style:n,children:e})}}const lf=Slider,uf="sliderHandle_root__9bioZ",cf="sliderHandle_withPointer__8uGuP",df="sliderHandle_vertical__0Z5sO",ff="sliderHandle_handle__x61ND",hf="sliderHandle_value__vy6lk",pf=({className:e,position:t,handleStyle:n,vertical:r,classNamePoiner:i,classNameValue:o,value:a,showPoiner:s})=>{const l=r?{bottom:t}:{left:t};return(0,ae.jsxs)("div",{"data-cy":"sliderhandle",className:lc()(uf,e,{[df]:r,[cf]:s}),style:l,children:[s&&(0,ae.jsx)("div",{className:lc()(ff,i),style:n}),a&&(0,ae.jsx)("div",{className:lc()(hf,o,{[cf]:s}),children:a})]})},mf=(0,i.memo)(pf);var gf;function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",vf({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 27",width:22,height:27,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,gf||(gf=i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M11 0C5 0 0 5 0 11c0 7.2 7.2 10.7 8 11.5 1 1 2 2.5 3 4.5 1-2 2-3.6 3-4.5.8-.8 8-4.3 8-11.5 0-6-5-11-11-11Z",fill:"#FFD338",fillRule:"nonzero"}),i.createElement("rect",{fill:"#000",fillRule:"nonzero",x:5,y:9,width:12,height:10,rx:2}),i.createElement("path",{d:"M8 7a3 3 0 1 1 6 0v2c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V7Z",stroke:"#000",strokeWidth:2}),i.createElement("circle",{fill:"#FFD338",fillRule:"nonzero",cx:11,cy:14,r:1}))))},bf=(0,i.forwardRef)(yf),Ef=(n.p,"totalTime_root__yBVjC");class TotalTime extends i.Component{render(){const{duration:e,skin:t,config:n,classes:r}=this.props;return n.controls.showTime?(0,ae.jsx)("div",{"data-cy":"TotalTime",className:lc()(Ef,r.progressBar__totalTime),style:uc("progressBar__totalTime",t,n),children:(0,of.q)(e)}):null}}TotalTime.defaultProps={classes:{}};const Sf=TotalTime,Af="currentTime_root__6kvcb";class CurrentTime extends i.Component{render(){const{currentTime:e,skin:t,config:n,classes:r}=this.props;return Ys(n,["controls","showTime"])?(0,ae.jsx)("div",{"data-cy":"progressBar-currentTime",className:lc()(Af,r.progressBar__currentTime),style:uc("progressBar__currentTime",t,n),children:(0,of.q)(e)}):null}}CurrentTime.defaultProps={classes:{}};const wf=CurrentTime,_f=({thumbnailGrids:e,isVisible:t,position:n,duration:r,player:i})=>{const o=(0,mc.tg)(),a=Number((r*n).toFixed()),s=Ys(i,["controls","showTime"]);let l,u=[0,0,0,0];if(e&&!(0,Be.Z)(e)){const r=e.width,l=e.height,u=e.tile.width*e.tile.height,c=[],d=Math.floor(a/e.interval),h=Math.floor(a/e.interval%u),p=Math.floor(d/u);for(let t=0;ta>=e&&a<=t+1));l=t?.url;const n=t?.images.find((({timestamp:e})=>a===e||(e=>1===Math.abs(e%2))(a)&&a-1===e));n&&(u=n.coordinates)}const[c,d,h,p]=u,m=h-c,g=p-d;return(0,ae.jsxs)("div",{className:lc()(rf.tipTime,{[rf.visible]:t}),style:{left:100*n+"%"},children:[t&&l&&(0,ae.jsx)("div",{className:rf.tipImage,style:{width:m,height:g,backgroundImage:`url(${l})`,backgroundPosition:`${-c}px ${-d}px`,backgroundRepeat:"no-repeat"}}),s&&(0,of.q)(a)]})},Tf=(0,i.memo)(_f);class ProgressBar extends i.PureComponent{constructor(...e){super(...e),this.lastDragPosition=void 0,this.state={isDragging:!1,tipTime:"",tipPosition:0,showTipTime:!1,wasPaused:!1},this.handleMouseUp=e=>{if(this.handleDraggingChange(!1),this.props.isChangingVideo||!this.props.hasStarted)return;const t=this.getNewTimeMinus1(this.lastDragPosition??e);!this.state.wasPaused&&this.props.requestPlay({time:t,isSilent:!0}),this.setState({showTipTime:!1}),this.lastDragPosition=void 0},this.handleMouseDown=()=>{this.handleDraggingChange(!0),this.props.hasStarted&&(!this.props.paused&&this.props.requestPause({isSilent:!0}),this.setState({wasPaused:this.props.paused}))},this.handleMouseMove=e=>{this.props.requestSeek({time:this.getNewTimeMinus1(e),initiatedBy:"click",type:"toTime"}),this.lastDragPosition=e,this.setState({showTipTime:!0,tipPosition:e})},this.handleMouseMoveOnTrack=e=>{this.setState({showTipTime:!0,tipPosition:e})},this.handleMouseLeaveOnTrack=()=>{this.setState({showTipTime:!1})},this.handleDraggingChange=e=>{this.setState({isDragging:e})},this.getProgress=()=>{const{currentTime:e,file:{metadata:{duration:t}}}=this.props,{isDragging:n,tipPosition:r}=this.state;let i=e;n&&(i=this.getNewTimeMinus1(r));const o=t&&i/t;return o>=1?1:o},this.getLoadedProgress=()=>{const{percentsLoaded:e,file:{metadata:{duration:t}}}=this.props;return Math.min(0!==t?e:0,1)},this.getNewTimeMinus1=e=>{const{file:{metadata:{duration:t}},firstTimestampBlock:n}=this.props,r=e*t;return void 0!==n?Math.min(r,Math.max(n-.5,0)):r},this.renderBar=()=>{const{player:e,file:{metadata:{duration:t},thumbnailGrids:n},firstTimestampBlock:r,skin:i}=this.props,{showTipTime:o,tipPosition:a}=this.state,s=this.getProgress(),l=r?this.getNewTimeMinus1(r):void 0,u=void 0!==l?l/t*100:void 0,c=`${Math.min(100*s,u||100).toFixed(2)}%`,d=`${(100*this.getLoadedProgress()).toFixed(2)}%`,{classes:h,handleValue:p}=i,m=Ys(e,["controls","showTime"]);return(0,ae.jsxs)("div",{className:lc()(rf.barWrap,h.progressBar__barWrap),children:[(0,ae.jsx)(Tf,{thumbnailGrids:n,duration:t,position:a,isVisible:o,player:e}),void 0!==l&&(0,ae.jsx)("div",{className:lc()(rf.blockedAreaIconWrapper),style:{left:`${u}%`,width:(t-l)/t*100+"%"},children:(0,ae.jsx)("div",{className:rf.funnelAreaIcon,children:(0,ae.jsx)(bf,{})})}),(0,ae.jsxs)("div",{className:lc()(rf.track,h.progressBar__track),children:[void 0!==l&&(0,ae.jsx)("div",{className:lc()(rf.blockedArea),style:{left:`${u}%`,width:(t-l)/t*100+"%"}}),(0,ae.jsx)("div",{className:lc()(rf.bar,h.progressBar__bar,h.progressBar__secondsLoaded,rf.secondsLoaded),style:{...uc("progressBar__bar",i,e),width:d}}),(0,ae.jsx)("div",{className:lc()(rf.bar,h.progressBar__bar),style:{...uc("progressBar__bar",i,e),width:c}})]}),(0,ae.jsx)(mf,{className:lc()(rf.handle,h.progressBar__handle_root),classNamePoiner:h.progressBar__handle_pointer,showPoiner:i.handles,classNameValue:h.progressBar__handle_value,handleStyle:uc("progressBar__handle",i,e),position:c,value:m&&p&&(0,of.q)(s*t,t)})]})}}render(){const{file:{metadata:{duration:e}},player:t,currentTime:n,isVideoReady:r,playerMode:i,skin:o}=this.props,{isDragging:a}=this.state,{classes:s,timeFormat:l}=o,u="together"===l;return(0,ae.jsxs)("div",{className:lc()(rf.root,s.progressBar__root,{[rf.dragging]:a,[rf.disabled]:!r}),style:uc("progressBar__root",o,t),children:[i!==ie.V.MINI_PLAYER&&(0,ae.jsx)(wf,{classes:s,skin:o,config:t,currentTime:n}),u&&(0,ae.jsx)(Sf,{duration:e,classes:s,skin:o,config:t}),(0,ae.jsx)(lf,{className:lc()(rf.slider,s.progressBar__slider),style:uc("progressBar__slider",o,t),onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onMouseDown:this.handleMouseDown,onLocalMouseMove:this.handleMouseMoveOnTrack,onLocalMouseLeave:this.handleMouseLeaveOnTrack,children:this.renderBar()}),!u&&(0,ae.jsx)(Sf,{duration:e,classes:s,skin:o,config:t})]})}}const Of={requestSeek:ee.ze,requestSeekAndBuffer:ee.Sp,requestPlay:ee.D0,requestPause:ee.hz},If=(0,de.$j)((e=>({isVideoReady:e.videoState.isVideoReady,currentTime:e.videoState.currentTime,paused:e.videoState.paused,percentsLoaded:e.videoState.percentsLoaded,firstTimestampBlock:Ko(e),isChangingVideo:(0,bo.Zh)(e),hasStarted:(0,Io.F3)(e)})),Of)(ProgressBar),xf=e=>{const t=(0,mc.tg)();return(0,ae.jsx)(If,{...e,skin:t})};var Cf=n(3510);const kf=i.createContext(void 0);var Rf=n(1484);const Lf=(e,t)=>{const{controls:{showRewatchButton:n},general:{onEnd:{action:r}}}=e;return!e.playNodeIdOnEnd&&n&&t&&"LOOP"!==r},Nf="playButton_root__-WXVL",Pf="playButton_visible__ucxgG",Df="playButton_icon__j301q",Bf=({player:e,allControlsAreAlwaysVisible:t})=>{const n=(0,de.I0)(),r=(0,i.useContext)(kf),[o,a]=(0,i.useState)(!1),s=(0,de.v9)(Uo),l=(0,de.v9)(Eo),u=(0,de.v9)(Io.Ut),c=(0,de.v9)(Io.TG),d=(0,de.v9)(Io.F3),h=(0,de.v9)(Io.aH),p=(0,de.v9)(Io.xI),m=(0,de.v9)(Rf.w),g=(0,de.v9)(la.sZ),v=(0,mc.tg)(),{controls:{playButton:y,customPlayButtonUrl:b}}=e,E=v.icons.play,S=(0,i.useCallback)((()=>{if(r){const e=r.selectedItemIds;return s.filter((({id:t})=>e.includes(t)))}return[]}),[r,s]),A=(0,i.useCallback)((e=>{e.stopPropagation();const t=S();r&&t.length>0?r.handleMultiDeselect():u?(n((0,ee.D0)({})),d||n((0,ee.A9)({type:"mute",mute:!1}))):n((0,ee.hz)({initiatedBy:"overlayClick"}))}),[S,r,u,n,d]),w="large"===y?1.4*g:g,_=uc("playButton__icon",v,e).color||"#fff",T=!t&&!d&&!c&&(h||e.general.autoplay)&&l,[O,I]=(0,i.useState)(void 0),x=(0,i.useCallback)((e=>{if(!e||T)return void I(void 0);const t=e;if(t){const e=t.querySelector("svg"),n=t.querySelector("img");I(e?parseFloat(e.width.baseVal.valueAsString):n?.naturalWidth)}else I(void 0)}),[T]);if(!t){if(Lf(e,p))return null;if(m)return null}return(0,ae.jsx)("button",{tabIndex:0,type:"button","aria-live":"polite",onPointerUp:A,"data-cy":"playbuttonOverlay-button",className:T?lc()(Nf,{[Pf]:!0}):lc()(Nf,v.classes.playButton__root,{[Pf]:l||t&&!(h||e.general.autoplay),[v.classes.playButton__visible]:l||t&&!(h||e.general.autoplay)}),children:T?(0,ae.jsx)("div",{style:{position:"absolute",inset:0,margin:"auto"},children:(0,ae.jsx)(ld.a,{delay:2e3})}):(0,ae.jsx)("span",{ref:x,children:"custom"===y?b?(0,ae.jsx)("img",{"data-cy":"playButtonOverlay-customPlayButton",className:Df,src:b,style:{width:O?Math.min(O*w,O).toFixed()+"px":void 0,height:"auto"},alt:""}):void 0:(0,ae.jsx)(E,{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),className:lc()(Df,v.classes.playButton__icon),style:{color:o?(0,Cf.ZP)(_).desaturate(25).toHexString():_,width:O?(O*w).toFixed()+"px":void 0,height:"auto"}})})})},Mf="styles_root__m4M-B",Ff=({player:e})=>{const{captions:t}=e.skin,n=(0,de.I0)(),r=(0,de.v9)(Io.Ut),o=(0,mc.tg)(),a=(0,i.useCallback)((()=>{n(r?(0,ee.D0)({}):(0,ee.hz)({}))}),[r,n]);if(!e.controls.showPlayButton)return null;const s=o.icons.togglePlay,l=o.icons.togglePause;return(0,ae.jsx)(gc,{dataCy:"togglePlayButton",className:lc()(Mf,o.classes.togglePlayButton__root,{[o.classes.togglePlayButton__play]:r,[o.classes.togglePlayButton__pause]:!r}),style:uc("togglePlayButton__root",o,e),config:e,onClick:a,icon:r?(0,ae.jsx)(s,{}):(0,ae.jsx)(l,{}),title:r?t.playText:t.pauseText})},Uf=(0,i.memo)(Ff),jf=({player:e,player:{skin:{captions:t}}})=>{const n=(0,de.I0)(),r=(0,de.v9)(la.yz),o=(0,mc.tg)(),a=(0,i.useCallback)((()=>{n(Xt(!r))}),[n,r]);if(!e.controls.showFullscreenButton)return null;const{classes:s}=o,l=o.icons.fullscreenEnter,u=o.icons.fullscreenExit;return(0,ae.jsx)(gc,{dataCy:"toggleFullscreem-button",className:s.toggleFullscreen__root,config:e,onClick:a,icon:r?(0,ae.jsx)(u,{}):(0,ae.jsx)(l,{}),title:t.fullscreenText})},Hf=(0,i.memo)(jf);var Vf=n(3130);const Gf=e=>e.subtitles.isVisible,zf=e=>e.subtitles.currentSubtitlesName;const Xf=function(e){(0,i.useEffect)(e,[])};const Wf=function(e){Xf((function(){e()}))},Qf=()=>{const e=(0,de.v9)(bo.CQ),t=(0,de.v9)(bo.hn),n=e||t?.id;return{storageVisibilityKeyRef:(0,i.useRef)(`voomlySubtitlesIsVisible|${n}`),storageSubtitlesSelectedKeyRef:(0,i.useRef)(`voomlySubtitlesSelectedId|${n}`)}},qf=G.ZP.div.withConfig({displayName:"ToggleSubtitles__StyledIconWrapper",componentId:"sc-v6nbh2-0"})(["position:relative;display:flex;align-items:center;justify-content:center;"]),Kf=G.ZP.div.withConfig({displayName:"ToggleSubtitles__StyledIndicator",componentId:"sc-v6nbh2-1"})(["position:absolute;bottom:-2px;right:-2px;width:7px;height:7px;background-color:var(--red-500);border-radius:50%;"]),Yf="SUBTITLES_TOGGLE",Zf=({file:e,player:t,player:{skin:{captions:n}},player:{subtitles:r},allControlsAreAlwaysVisible:o})=>{(({player:{subtitles:e,skin:{subtitles:t}}})=>{const n=(0,de.I0)(),{storageSubtitlesSelectedKeyRef:r,storageVisibilityKeyRef:o}=Qf(),a=(0,de.v9)(Gf),s=(0,de.v9)(zf),l=(0,i.useMemo)((()=>e?.items.filter((e=>e.isEnabled))||[]),[e?.items]);Wf((()=>{const i=t.showByDefault,o=e?.defaultSubtitlesId,a=l.find((e=>e.subtitlesId===o||e.name===o))?.name,s=re.A7.getItem(r.current);if(!l.length)return void re.A7.removeItem(r.current);const u=l[0].name,c=!!l.find((e=>e.name===s)),d=!!l.find((e=>e.name===a));return i&&a&&!c&&d?(re.A7.setItem(r.current,a),void n(jt(a))):s&&c?void n(jt(s)):d&&i?void 0:(re.A7.setItem(r.current,u),void n(jt(u)))})),Wf((()=>{if(t.showByDefault&&!re.A7.getItem(o.current))re.A7.setItem(o.current,"true"),n(Ut(!0));else if(null!==re.A7.getItem(o.current)){const e="true"===re.A7.getItem(o.current);n(Ut(e))}})),(0,i.useEffect)((()=>{re.A7.setItem(o.current,a.toString())}),[o,a]),(0,i.useEffect)((()=>{s&&re.A7.setItem(r.current,s)}),[s,r])})({player:t,file:e});const a=(0,mc.tg)(),s=(0,de.I0)(),l=(0,de.v9)(Gf),u=(0,de.v9)(zf),c=(0,i.useMemo)((()=>r?.items.filter((e=>e.isEnabled))||[]),[r?.items]),d=(0,i.useCallback)((()=>{s(Ut(void 0))}),[s]),h=(0,i.useCallback)((e=>{s(e?Nn("SELECT_SUBTITLES"):Pn("SELECT_SUBTITLES"))}),[s]),p=(0,i.useCallback)((e=>{e!==Yf?(s(jt(e)),s(Ut(!0))):d()}),[s,d]),m=(0,i.useMemo)((()=>[l?{label:"Off",value:Yf}:void 0,...c.map((e=>({label:e.name,value:e.name})))].filter(Boolean)),[c,l]),g=(0,i.useMemo)((()=>{const e=a.icons.subtitles;return{config:t,icon:(0,ae.jsxs)(qf,{children:[l&&(0,ae.jsx)(Kf,{}),(0,ae.jsx)(e,{})]}),title:n.subtitlesText}}),[n.subtitlesText,t,a,l]),v=(0,i.useMemo)((()=>{if(l)return m.find((e=>!!u&&e.value===u))?.value}),[u,l,m]),y=(0,ae.jsx)(xc,{className:lc()(a.classes.toggleChapters__root,Pc.selectSubtitlesDropdown),buttonProps:g,config:t,options:m,selectedValue:v,onSelect:p,onChangeOpen:h});return t.controls.showSubtitlesButton&&c.length||o&&t.controls.showSubtitlesButton?y:null},Jf=e=>{const{storageSubtitlesSelectedKeyRef:t,storageVisibilityKeyRef:n}=Qf(),[r,o]=(0,i.useState)((0,Vf.generate)()),a=fe(e.player.subtitles),s=fe(e.player.skin.subtitles.showByDefault);return(0,i.useEffect)((()=>{a===e.player.subtitles&&s===e.player.skin.subtitles.showByDefault||(re.A7.removeItem(t.current),re.A7.removeItem(n.current),o((0,Vf.generate)()))}),[e.player.skin.subtitles.showByDefault,e.player.subtitles,a,s,t,n]),(0,ae.jsx)(Zf,{...e},r)},$f=({fill:e,scale:t=1})=>(0,ae.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:28*t,height:33*t,viewBox:"0 0 33 36",children:(0,ae.jsx)("g",{transform:"translate(2,2)",children:(0,ae.jsx)("path",{fill:e,fillRule:"nonzero",d:"M0 4.993v22.011a5 5 0 0 0 7.535 4.31l18.71-11.005a5 5 0 0 0 0-8.619L7.534.683A5 5 0 0 0 0 4.993z"})})}),eh=({fill:e,scale:t=1})=>(0,ae.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:20*t,height:26*t,viewBox:"0 0 20 26",children:(0,ae.jsx)("path",{fill:e,fillRule:"nonzero",d:"M4 2a2 2 0 0 0-2 2v18a2 2 0 1 0 4 0V4a2 2 0 0 0-2-2zm0-2a4 4 0 0 1 4 4v18a4 4 0 1 1-8 0V4a4 4 0 0 1 4-4zm12 2a2 2 0 0 0-2 2v18a2 2 0 1 0 4 0V4a2 2 0 0 0-2-2zm0-2a4 4 0 0 1 4 4v18a4 4 0 1 1-8 0V4a4 4 0 0 1 4-4z"})}),th="playPauseOverlay_wrapper__-4P5m",nh="playPauseOverlay_hideAnimation__oGz5q";class PlayPauseOverlay extends i.PureComponent{constructor(...e){super(...e),this.state={addedIcons:[]},this.removeIcon=()=>{this.setState({addedIcons:this.state.addedIcons.slice(1)})}}componentWillUnmount(){this.state.addedIcons.forEach((e=>{clearTimeout(e.timeoutHandle)})),this.setState({addedIcons:[]})}componentDidUpdate(e){!this.props.isVideoEnded&&!this.props.isVeryCloseToEnd&&(e.hasStarted||!this.props.isZeroTime)&&this.props.paused!==e.paused&&!this.props.swallowPlayPauseOverlay&&(this.props.isSilent?this.props.setPlayPauseSilentMode({isSilent:!1}):this.appendIcon(!this.props.paused))}appendIcon(e){const{isBlocked:t}=this.props;if(t)return;const n=window.setTimeout(this.removeIcon,720);this.setState({addedIcons:[...this.state.addedIcons,{timeoutHandle:n,isPlayIcon:e}]})}render(){const{addedIcons:e}=this.state;return e.map((({timeoutHandle:t,isPlayIcon:n},r)=>{const i=r===e.length-1;return(0,ae.jsx)("div",{className:th,children:(0,ae.jsx)("div",{className:lc()({[nh]:!i}),children:(0,ae.jsx)("div",{children:n?(0,ae.jsx)($f,{scale:this.props.scale}):(0,ae.jsx)(eh,{scale:this.props.scale})})})},t)}))}}const rh={setPlayPauseSilentMode:ee.as},ih=(0,de.$j)(((e,t)=>{const n=t.file.metadata.duration-e.videoState.currentTime;return{swallowPlayPauseOverlay:e.miscScreenObjects.swallowPlayPauseOverlay,paused:e.videoState.paused,isVideoEnded:e.videoState.isEnded,hasStarted:e.videoState.hasStarted,isZeroTime:e.videoState.currentTime<.5,isVeryCloseToEnd:n<.5,isBlocked:e.playPauseOverlay.blockedBy.length>0,isSilent:e.videoState.isPlayPauseSilentMode,scale:Math.max((0,la.Z0)((0,la.L2)(e)),(0,la.Z0)((0,la.$Q)(e)))}}),rh)(PlayPauseOverlay),oh={root:"volume_root__vsGH4",slider:"volume_slider__vxLVa",opened:"volume_opened__rOAo5",withTip:"volume_withTip__WszlE",track:"volume_track__FhOiY",trackBg:"volume_trackBg__xS6Qp",bar:"volume_bar__pWYXZ",icon:"volume_icon__IkODq",crossIcon:"volume_crossIcon__1r6jo",visible:"volume_visible__gUniE"},ah=({player:e,volume:t,skin:n})=>{const r=t<=0?0:100*t;return(0,ae.jsxs)("div",{className:oh.trackWrapper,children:[(0,ae.jsxs)("div",{className:lc()(oh.track,n.classes.volume__track),style:uc("volume__track",n,e),children:[(0,ae.jsx)("div",{className:lc()(oh.trackBg,n.classes.volume__trackBg),style:uc("volume__trackBg",n,e)}),(0,ae.jsx)("div",{"data-cy":"volume-volumeBar",className:lc()(oh.bar,n.classes.volume__bar),style:{...uc("volume__bar",n,e),height:r}}),n.handles&&(0,ae.jsx)(mf,{handleStyle:uc("volume__trackBg",n,e),position:r,vertical:!0})]}),n.tips&&(0,ae.jsx)(fc,{skin:n,config:e})]})},sh=({player:e,player:{skin:{captions:t}}})=>{const n=(0,de.I0)(),[r,o]=(0,i.useState)(!1),a=(0,i.useRef)(!1),s=(0,i.useRef)(!1),l=(0,de.v9)(Io.FC),u=(0,de.v9)(Ea),c=(0,de.v9)(Io.u_),d=(0,mc.tg)(),h=d.icons.volume,p=d.icons.volumeMuted;(0,i.useEffect)((()=>{u||o(!1)}),[u]);const m=(0,i.useCallback)((e=>{const t=12/122,r=12/122;n(e<=t?(0,ee.A9)({volume:0,type:"absoluteVolume"}):e>=1-r?(0,ee.A9)({volume:1,type:"absoluteVolume"}):(0,ee.A9)({volume:1.19672131147541*e-t,type:"absoluteVolume"}))}),[n]),g=(0,i.useCallback)((()=>{n(l<=0||c?(0,ee.A9)({mute:!1,type:"mute"}):(0,ee.A9)({mute:!0,type:"mute"}))}),[n,l,c]),v=(0,i.useCallback)((()=>{s.current=!1,a.current||o(!1)}),[]),y=(0,i.useCallback)((()=>{s.current=!0,o(!0)}),[]),b=(0,i.useCallback)((()=>{a.current=!1,s.current||o(!1)}),[]),E=(0,i.useCallback)((()=>{a.current=!0,document.addEventListener("mouseup",b)}),[b]);return e.controls.showVolumeButton?(0,ae.jsxs)("div",{className:lc()(oh.root,d.classes.volume__root),onMouseLeave:v,children:[!Ja&&(0,ae.jsx)(lf,{className:lc()(oh.slider,d.classes.controls__popover,d.classes.volume__popover,{[oh.opened]:r,[d.classes.controls__popoverOpened]:r,[oh.withTip]:d.tips}),style:uc("controls__popover",d,e),onMouseMove:m,onMouseDown:E,vertical:!0,children:(0,ae.jsx)(ah,{volume:l,skin:d,player:e})}),(0,ae.jsx)(gc,{className:d.classes.volume__button,isHovered:r,config:e,icon:l<=0||c?(0,ae.jsx)(p,{}):(0,ae.jsx)(h,{}),onClick:g,onMouseOver:y,title:t.volumeText,dataCy:"volume-button"})]}):null},lh=(0,i.memo)(sh);var uh;function ch(){return ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",ch({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",width:30,height:30,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,uh||(uh=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.48 6.77H9.86a5.32 5.32 0 0 0-4.52 8.11l4.64 7.82a3.82 3.82 0 0 0 6.73.02l9.18-15.2a.5.5 0 0 0-.41-.75ZM12.9 21.05l-4.76-7.97a2 2 0 0 1 1.72-2.98h9.85a.5.5 0 0 1 .42.74L13.8 21.06a.5.5 0 0 1-.9 0Z",fill:"currentColor"})))},fh=(0,i.forwardRef)(dh),hh=(n.p,"logo_root__sTEWS"),ph="logo_visible__KK45T",mh=({openInNewTab:e,dataCy:t,...n})=>(0,ae.jsx)("a",{"data-cy":t,...n,target:e?"_blank":"_top",rel:"nofollow noopener noreferrer",children:n.children}),gh=({player:e})=>{const{skin:{customLogoUrl:t,customUrl:n,useCustomLogo:r,logoEnabled:o,captions:a,defaultLogoUrl:s,customizationName:l,landingUrl:u}}=e,c=(0,de.v9)((e=>e.videoControls.isLogoVisible)),d=(0,i.useCallback)((()=>t?n?(0,ae.jsx)(mh,{href:n,openInNewTab:!0,children:(0,ae.jsx)("img",{src:t,title:a.logoText,alt:a.logoText})}):(0,ae.jsx)("img",{src:t,title:a.logoText,alt:a.logoText}):null),[t,n,a.logoText]),h=(0,mc.tg)();if(!o||r&&!t)return null;const p="Voomly"!==l&&void 0!==l;return(0,ae.jsx)("div",{style:uc("logo",h,e),className:lc()(hh,hc,h.classes.button__root,h.classes.logo,{[ph]:c}),children:r?d():(0,ae.jsx)(mh,{dataCy:"logo-a",title:`Powered by ${p?l:"Voomly"}`,href:p?u:"https://www.voomly.com",openInNewTab:!0,children:p?(0,ae.jsx)("img",{alt:"Powered logo",src:s}):(0,ae.jsx)(fh,{})})})},vh={voomlyPlayerControls:"controls_voomlyPlayerControls__TnkZF",root:"controls_root__34+ah",visible:"controls_visible__Ba5EB",buttons:"controls_buttons__iGVQG",hideCursor:"controls_hideCursor__xB5l+",passThrough:"controls_passThrough__F1cC-"};var yh;function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",bh({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:12,height:12,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,yh||(yh=i.createElement("path",{fill:"currentColor",d:"M6 0C4.47 0 3.08.58 2.02 1.52L1 .5v3h3L2.73 2.23A5 5 0 0 1 11 6 5 5 0 1 1 1 6a.5.5 0 1 0-1 0 6 6 0 1 0 6-6z"})))},Sh=(0,i.forwardRef)(Eh),Ah=(n.p,"styles_rewatchButtonWrapper__q+BDS"),wh="styles_rewatchButton__p-uKX",_h="styles_replayIcon__Q1C4s",Th=({player:e})=>{const t=(0,de.I0)(),n=(0,de.v9)(Io.xI),r=(0,i.useCallback)((e=>{e.stopPropagation(),t((0,ee.D0)({}))}),[t]);return Lf(e,n)?(0,ae.jsx)("div",{className:Ah,children:(0,ae.jsx)("button",{"data-cy":"rewatchButton",className:wh,onClick:r,children:(0,ae.jsxs)("span",{children:[(0,ae.jsx)(Sh,{className:_h}),e.skin.captions.rewatchText]})})}):null},Oh=(0,i.memo)(Th);var Ih;function xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",xh({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 4 16",width:4,height:16,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,Ih||(Ih=i.createElement("path",{d:"M2 .96C.944.96.08 1.826.08 2.88.08 3.938.944 4.8 2 4.8s1.92-.863 1.92-1.92C3.92 1.826 3.056.96 2 .96Zm0 5.12C.944 6.08.08 6.946.08 8 .08 9.058.944 9.92 2 9.92S3.92 9.058 3.92 8c0-1.055-.864-1.92-1.92-1.92Zm0 5.12c-1.056 0-1.92.865-1.92 1.92 0 1.057.864 1.92 1.92 1.92s1.92-.863 1.92-1.92c0-1.055-.864-1.92-1.92-1.92Z",fill:"currentColor"})))},kh=(0,i.forwardRef)(Ch),Rh=(n.p,G.ZP.div.withConfig({displayName:"ToggleCompactControls__Wrapper",componentId:"sc-1iwhen1-0"})(["display:flex;width:100%;height:100%;"])),Lh=G.ZP.div.withConfig({displayName:"ToggleCompactControls__WrapperLayers",componentId:"sc-1iwhen1-1"})(["display:flex;width:100%;height:100%;position:relative;"]),Nh=G.ZP.div.withConfig({displayName:"ToggleCompactControls__FirstLayer",componentId:"sc-1iwhen1-2"})(["position:absolute;top:0;left:0;display:flex;width:100%;height:100%;transform:translateY(0);opacity:1;transition:all 300ms ease-in-out;",""],(({isOpen:e})=>e&&(0,G.iv)(["transform:translateY(20px);opacity:0;"]))),Ph=G.ZP.div.withConfig({displayName:"ToggleCompactControls__SecondLayer",componentId:"sc-1iwhen1-3"})(["position:absolute;top:0;left:0;display:flex;width:100%;height:100%;align-items:center;justify-content:flex-end;transform:translateY(-20px);opacity:0;transition:all 300ms ease-in-out;",""],(({isOpen:e})=>e&&(0,G.iv)(["transform:translateY(0);opacity:1;"]))),Dh=({firstLayerContent:e,secondLayerContent:t,config:n})=>{const r=(0,mc.tg)(),[o,a]=(0,i.useState)(!1),s=(0,i.useCallback)((()=>{a((e=>!e))}),[]);return(0,ae.jsxs)(Rh,{"data-cy":"toggleCompactControls-wrapper",className:r.classes.controls__compact_wrapper,style:uc("controls__compact_wrapper",r,n),children:[(0,ae.jsxs)(Lh,{children:[(0,ae.jsx)(Nh,{isOpen:o,children:e}),t&&(0,ae.jsx)(Ph,{isOpen:o,children:t})]}),t&&(0,ae.jsx)(gc,{dataCy:"toggleCompactControls-dotsIcon",config:n,onClick:s,icon:(0,ae.jsx)(kh,{})})]})},Bh="styles_backButton__-0WzZ",Mh=({player:e,allControlsAreAlwaysVisible:t})=>{const n=(0,de.I0)(),r=(0,mc.tg)(),{muted:o,volume:a}=(0,de.v9)(Io.yf),s=(0,de.v9)((e=>{const{backButtonReferences:t}=e.miscScreenObjects;return t[t.length-1]})),l=(t||s)&&e.controls.showBackButton,u=(0,de.v9)(bo.Zh),c=(0,de.v9)(Wo),d=(0,i.useCallback)((()=>{!u&&c&&(n((0,ee.hz)({isSilent:!0})),n(An()),n(kn({nodeId:c.nodeId,timestamp:c.timestamp,muted:o,volume:a})))}),[n,u,c,o,a]);if(!l)return null;const h=r.icons.backButton;return(0,ae.jsx)("div",{className:lc()(Bh,r.classes.backButton),style:uc("backButton",r,e),onClick:d,children:(0,ae.jsx)(h,{})})},Fh=({player:e,file:t,playerMode:n,allControlsAreAlwaysVisible:r,videoError:o})=>{const a=(0,qd.J)(),s=(0,mc.tg)(),l=Id(),u=Id("controlBar"),c=(0,de.v9)(la.yz),d=(0,de.v9)(la.L2),h=(0,de.v9)(la.y3),p=(0,de.v9)(wa),m=(0,de.v9)(Sa),{controls:{showPlayBar:g,showFullscreenButton:v,showSelectSpeedButton:y,showVolumeButton:b,showSelectQualityButton:E},chapters:S}=e,A=v||y||E||b||S.enabled,w={player:e,file:t,playerMode:n,buttonsScale:h,allControlsAreAlwaysVisible:r},_=!o&&(r||![ie.V.TIMELINE_EDITOR,ie.V.THUMBNAIL_EDITOR,ie.V.MINI_PLAYER].includes(n)),T=(0,i.useCallback)((e=>{e.currentTarget.focus()}),[]),O=!c&&d<300,I=(0,i.useCallback)((e=>{T(e),l.onClick?.(e)}),[l,T]);return a?.isOpen&&O||n===ie.V.THUMBNAIL_EDITOR?null:(0,ae.jsxs)("div",{"data-cy":"controls-dataSkin","data-skin":s.key,"data-controlbar-position":e.skin.controlBarPosition,className:lc()(vh.voomlyPlayerControls,{[vh.isFullScreen]:c,[vh.hideCursor]:!p,[vh.passThrough]:o}),...l,tabIndex:0,onClick:I,children:[(0,ae.jsx)(Mh,{...w}),(0,ae.jsx)(nf,{...w}),(0,ae.jsx)(Oh,{...w}),_&&(0,ae.jsxs)("div",{children:[(0,ae.jsx)(Bf,{...w}),(0,ae.jsx)(ih,{...w})]}),g&&(0,ae.jsx)("div",{"data-cy":"controls-root",className:lc()(vh.root,s.classes.controls__root,{[vh.visible]:m,[s.classes.noControlButtons]:!A,[s.classes.compact]:O}),style:uc("controls__root",s,e),...u,children:O?(0,ae.jsx)(Dh,{config:e,firstLayerContent:(0,ae.jsx)(xf,{...w}),secondLayerContent:n!==ie.V.MINI_PLAYER?(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(lh,{...w}),(0,ae.jsx)(Nc,{...w}),(0,ae.jsx)(Mc,{...w}),(0,ae.jsx)(Qd,{...w}),(0,ae.jsx)(Kd,{...w}),(0,ae.jsx)(Hf,{...w}),(0,ae.jsx)(gh,{...w})]}):void 0}):(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(Uf,{...w}),(0,ae.jsx)(xf,{...w}),n!==ie.V.MINI_PLAYER?(0,ae.jsxs)(ae.Fragment,{children:[A&&(0,ae.jsxs)("div",{className:lc()(vh.buttons,s.classes.controls__buttons),style:uc("controls__buttons",s,e),children:[(0,ae.jsx)(lh,{...w}),(0,ae.jsx)(Nc,{...w}),(0,ae.jsx)(Qd,{...w}),(0,ae.jsx)(Kd,{...w}),(0,ae.jsx)(Jf,{...w}),(0,ae.jsx)(Mc,{...w}),(0,ae.jsx)(Hf,{...w})]}),(0,ae.jsx)(gh,{...w})]}):void 0]})})]})};var Uh=n(9993),jh=n(9999),Hh=n(7655),Vh=n.n(Hh);const Gh=Object.prototype.toString;function zh(e,t){return Gh.call(e)===`[object ${t}]`}function Xh(e){return zh(e,"Object")}function Wh(e){return Boolean(e&&e.then&&"function"==typeof e.then)}var Qh=n(1959);function qh(){const e=Qh.n2,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(r){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}var Kh=n(8271);const Yh=["debug","info","warn","error","log","assert","trace"],Zh={};function Jh(e){if(!("console"in Qh.n2))return e();const t=Qh.n2.console,n={},r=Object.keys(Zh);r.forEach((e=>{const r=Zh[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}!function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};Yh.forEach((e=>{t[e]=()=>{}}))}();const $h="production";var ep;!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ep||(ep={}));class SyncPromise{constructor(e){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),this._state=ep.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new SyncPromise(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new SyncPromise(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(ep.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ep.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===ep.PENDING&&(Wh(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===ep.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===ep.RESOLVED&&e[1](this._value),this._state===ep.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function tp(){return(0,Qh.YO)("globalEventProcessors",(()=>[]))}function np(e,t,n,r=0){return new SyncPromise(((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const s=a({...t},n);Wh(s)?s.then((t=>np(e,t,n,r+1).then(i))).then(null,o):np(e,s,n,r+1).then(i).then(null,o)}}))}function rp(e){return ip(e,new Map)}function ip(e,t){if(Xh(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const i of Object.keys(e))void 0!==e[i]&&(r[i]=ip(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(ip(e,t))})),r}return e}function op(e){const t=(0,Kh.ph)(),n={sid:qh(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return rp({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&ap(n,e),n}function ap(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,Kh.ph)(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:qh()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function sp(e){const{data:t,description:n,op:r,parent_span_id:i,span_id:o,status:a,tags:s,trace_id:l,origin:u}=e.toJSON();return rp({data:t,description:n,op:r,parent_span_id:i,span_id:o,status:a,tags:s,trace_id:l,origin:u})}function lp(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o,propagationContext:a}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:s}=t;n&&Object.keys(n).length&&(e.extra={...n,...e.extra});r&&Object.keys(r).length&&(e.tags={...r,...e.tags});i&&Object.keys(i).length&&(e.user={...i,...e.user});o&&Object.keys(o).length&&(e.contexts={...o,...e.contexts});a&&(e.level=a);s&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:sp(t),...e.contexts};const n=t.transaction;if(n){e.sdkProcessingMetadata={dynamicSamplingContext:n.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const t=n.name;t&&(e.tags={transaction:t,...e.tags})}}(e,r),function(e,t){e.fingerprint=e.fingerprint?function(e){return Array.isArray(e)?e:[e]}(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t,n){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t,propagationContext:n}}(e,o,a)}class scope_Scope{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=up()}static clone(e){return e?e.clone():new scope_Scope}clone(){const e=new scope_Scope;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ap(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof scope_Scope?t:this}return e instanceof scope_Scope?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Xh(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=up(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:(0,Kh.yW)(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:o,_level:a,_fingerprint:s,_eventProcessors:l,_propagationContext:u,_sdkProcessingMetadata:c,_transactionName:d,_span:h}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:o,level:a,fingerprint:s||[],eventProcessors:l,propagationContext:u,sdkProcessingMetadata:c,transactionName:d,span:h}}applyToEvent(e,t={},n=[]){lp(e,this.getScopeData());return np([...n,...tp(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}function up(){return{traceId:qh(),spanId:qh().substring(16)}}const cp=parseFloat("7.92.0"),dp=100;class Hub{constructor(e,t,n,r=cp){let i,o;this._version=r,t?i=t:(i=new scope_Scope,i.setClient(e)),n?o=n:(o=new scope_Scope,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version(this.popScope(),e)),(e=>{throw this.popScope(),e})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:qh(),r=new Error("Sentry syntheticException");return this._withClient(((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)})),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:qh(),i=new Error(e);return this._withClient(((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)})),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:qh();return e.type||(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=dp}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:(0,Kh.yW)(),...e},s=i?Jh((()=>i(a,t))):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,t),n.addBreadcrumb(s,o))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=hp(this);try{e(this)}finally{hp(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),ap(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=$h}=n&&n.getOptions()||{},{userAgent:o}=Qh.n2.navigator||{},a=op({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),s=t.getSession&&t.getSession();return s&&"ok"===s.status&&ap(s,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=fp().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t)}}function fp(){return Qh.n2.__SENTRY__=Qh.n2.__SENTRY__||{extensions:{},hub:void 0},Qh.n2}function hp(e){const t=fp(),n=vp(t);return yp(t,e),n}function pp(){const e=fp();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return mp(e)}function mp(e=fp()){return gp(e)&&!vp(e).isOlderThan(cp)||yp(e,new Hub),vp(e)}function gp(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function vp(e){return(0,Qh.YO)("hub",(()=>new Hub),e)}function yp(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}new WeakMap;function bp(e){if(e)return function(e){return e instanceof scope_Scope||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>Ep.includes(e)))}(e)?{captureContext:e}:e}const Ep=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];const Sp=function(e){var t=(0,i.useRef)(e);t.current=e,Xf((function(){return function(){return t.current()}}))};const Ap=(0,i.createContext)({hlsRef:{current:void 0},videoRef:{current:void 0},registerHls:e=>{},registerVideo:e=>{},addListener:(e,t)=>()=>{}}),wp=e=>{const t=()=>{const e=()=>{c.current?.destroy(),c.current=void 0,h.current=!1,n(void 0)},{url:t,load:r,skipBotDetection:i,onReady:s,onError:l,startPosition:p,replacedAt:m}=u.current,g=d.current,v=m?Math.floor(new Date(m).getTime()/1e3):void 0;if(!g)return void e();if(!Vh().isSupported()||!t)return e(),void l?.("HLS is not supported by the browser");const y=(e,t)=>t?e.includes("?")?e.includes(`v=${t}`)?e:`${e}&v=${t}`:`${e}?v=${t}`:e,b=!!c.current&&!c.current.autoLevelEnabled?c.current.currentLevel:void 0,E={autoStartLoad:r,capLevelToPlayerSize:!0,debug:!1,maxMaxBufferLength:10,startPosition:p,startLevel:-1,abrEwmaDefaultEstimate:1e7,testBandwidth:!1,pLoader:class CustomLoader extends Vh().DefaultConfig.loader{load(e,t,n){const{type:r}=e;if(e.url=y(e.url,v),"manifest"===r&&!i){const e=n.onSuccess.bind(this);n.onSuccess=(t,n,r,i)=>{(e=>{const{onBotDetection:t,skipBotDetection:n}=u.current;try{if(!n&&!o)return c.current&&(c.current.config.autoStartLoad=!e),void t?.(e);c.current&&(c.current.config.autoStartLoad=!0),t?.(!1)}finally{a(!0)}})(!!window?.voomlyEmbedPlayerPreloader?.isBotDetected),e(t,n,r,i)}}super.load(e,t,n)}},fLoader:class CustomFragmentLoader extends Vh().DefaultConfig.loader{load(e,t,n){e.url=y(e.url,v),super.load(e,t,n)}}},S=c.current?.bandwidthEstimate;S&&!Number.isNaN(S)&&(console.debug("Use defaultBandwidthEstimate",S),E.abrEwmaDefaultEstimate=S,E.testBandwidth=!1),console.debug("HLS init params: ",E),e(),c.current=new(Vh())(E),n(c.current);const A=c.current;A.attachMedia(g),A.on(Vh().Events.MEDIA_ATTACHED,(()=>{A.loadSource(t),A.on(Vh().Events.MANIFEST_PARSED,(()=>{void 0!==b&&(A.currentLevel=b),h.current=!0,s?.()}))})),A.on(Vh().Events.FRAG_LOADED,(()=>{u.current.onBotDetection?.(!1)})),A.on(Vh().Events.ERROR,((e,t)=>{const r=t.type,i=t.details,o=t.fatal;if(o)if(r===Hh.ErrorTypes.MEDIA_ERROR)A.recoverMediaError();else A.destroy(),n(void 0),l?.(t);else console.error("player error, but continue",t),"internalException"===t.details&&(a=t,pp().captureException(a,bp(s)));var a,s;console.log({errorType:r,errorDetails:i,errorFatal:o})}))},{registerHls:n,registerVideo:r}=(()=>{const{registerHls:e,registerVideo:t}=(0,i.useContext)(Ap);return{registerHls:e,registerVideo:t}})(),[o,a]=(0,i.useState)(!1),s=fe(o),l=fe(e),u=function(e){const t=(0,i.useRef)(e);return t.current=e,t}(e),c=(0,i.useRef)(void 0),d=(0,i.useRef)(null),h=(0,i.useRef)(!1),p=(0,i.useCallback)((e=>{r(e??void 0),d.current=e}),[r]);return(0,i.useEffect)((()=>{if(l){if(l.url!==e.url&&(e.onBotDetection?.(!1),t()),c.current){if(l.quality!==e.quality){const t=e.quality??-1;c.current.currentLevel=-1===t?-1:Math.max(c.current.levels.length-t,0)-1}e.load&&l.load!==e.load&&h.current&&c.current.startLoad(),e.autoplay||!o||s||e.isBotDetected||c.current.startLoad()}}else t()})),Sp((()=>{c.current?.destroy(),n(void 0)})),(0,ae.jsx)(ae.Fragment,{children:e.children({registerVideoRef:p})})},_p=(...e)=>t=>{e.forEach((e=>{e&&("function"==typeof e?e(t):e.current=t)}))},Tp=({url:e,replacedAt:t,videoRef:n,fromTime:r,poster:i="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",disablePoster:o,...a})=>{const s=o?void 0:i;return ts()?(0,ae.jsx)("video",{poster:s,ref:_p(n),...a,children:(0,ae.jsx)("source",{src:`${e}#t=${r}`,type:"application/x-mpegURL"})}):(0,ae.jsx)(wp,{url:e,replacedAt:t,skipBotDetection:!0,load:!0,startPosition:r,children:({registerVideoRef:e})=>(0,ae.jsx)("video",{"data-cy":"videoFrame-video",poster:s,ref:_p(n,e),...a})})},Op=(0,i.memo)(Tp),Ip=G.ZP.div.withConfig({displayName:"VideoLoop__FirstFrameWrapper",componentId:"sc-1dtml34-0"})(["position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0;width:100%;height:100%;",""],(({isVisible:e})=>!e&&(0,G.iv)(["visibility:hidden;"]))),xp=G.ZP.img.withConfig({displayName:"VideoLoop__FirstFrame",componentId:"sc-1dtml34-1"})(["width:100%;max-height:100%;object-fit:cover;"]),Cp=G.ZP.div.withConfig({displayName:"VideoLoop__VideoLoopStyled",componentId:"sc-1dtml34-2"})(["display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;overflow:hidden;will-change:filter;filter:blur(0px);transition:0.4s filter ease-out;video{max-width:100%;max-height:100%;}",""],(({showBlur:e})=>e&&(0,G.iv)(["filter:blur(10px);"]))),kp=(0,G.ZP)((({fromTime:e,toTime:t,shouldPlay:n=!0,paused:r=!1,videoUrl:o,onFirstLoadStarted:a,onFirstLoadFinished:s,onSeeking:l,onCanPlay:u,firstFrameUrl:c,showBlur:d=!1,forceShowPreviewFallback:h,previewFallbackUrl:p,className:m})=>{const g=(0,i.useRef)(null),v=(0,i.useRef)(null),y=fe(n),[b,E]=(0,i.useState)(!1),[S,A]=(0,i.useState)(!1);(0,i.useEffect)((()=>{n||g.current&&(g.current.currentTime=t)}),[t,n]),(0,i.useEffect)((()=>{g.current&&(!n||y||r?(!n&&y||r)&&g.current.pause():(g.current.currentTime=e,g.current.play().catch((()=>{}))))}),[n,y,e,r]),(0,i.useEffect)((()=>{g.current&&(g.current.currentTime=e)}),[e]);const w=(0,i.useCallback)((()=>{if(!g.current)return;if(!n)return;const r=g.current;r.currentTime>=Math.min(t,r.duration)&&(r.currentTime=e,r.paused&&r.play())}),[e,t,n]),_=Boolean(c&&!b);return(0,i.useLayoutEffect)((()=>{if(!v.current)return;const e=new IntersectionObserver((t=>{t.some((e=>e.isIntersecting))&&(A(!0),e.disconnect())}),{threshold:.01});return e.observe(v.current),()=>{e.disconnect()}}),[]),(0,ae.jsxs)(Cp,{ref:v,showBlur:_||d,className:m,children:[h||!S?p?(0,ae.jsx)(Uh.d,{className:Rp,url:c??p,size:"auto",alt:"Video preview"}):(0,ae.jsx)("div",{}):(0,ae.jsx)(Op,{url:o,videoRef:g,fromTime:e,playsInline:!0,autoPlay:!0,muted:!0,controls:!1,crossOrigin:"anonymous",onTimeUpdate:w,onLoadStart:a,onLoadedData:s,onSeeking:l,onCanPlayThrough:()=>{E(!0),u?.()}}),(0,ae.jsx)(Ip,{isVisible:_,children:(0,ae.jsx)(xp,{src:c,alt:"Thumbnail"})})]})})).withConfig({displayName:"VideoLoop",componentId:"sc-1dtml34-3"})([""]),Rp="thumbnail-image",Lp=G.ZP.div.withConfig({displayName:"Thumbnail__StyledThumbnailRoot",componentId:"sc-yiwbk-0"})(["display:flex;justify-content:center;position:absolute;top:0;left:0;height:100%;width:100%;.","{z-index:1;width:100%;height:100%;object-fit:cover;}"],Rp);class Thumbnail extends i.PureComponent{constructor(...e){super(...e),this.state={thumbnailLoadingStatus:"loading"},this.handleSetThumbnailLoadingStatus=e=>{this.setState({thumbnailLoadingStatus:e})}}renderPreviewImage(e){const{thumbnailLoadingStatus:t}=this.state;if(!e||e===jh.B)return console.error("Thumbnail renderPreviewImage: no src provided"),null;const n=Rp;let r;return r=0===e.indexOf("blob:")?(0,ae.jsx)("img",{className:n,src:e,alt:"Video preview",onLoad:e=>this.handleSetThumbnailLoadingStatus("loaded"),onError:e=>this.handleSetThumbnailLoadingStatus("error")}):(0,ae.jsx)(Uh.d,{className:n,url:e,size:"auto",alt:"Video preview",disableFadeIn:this.props.playerMode===ie.V.THUMBNAIL_EDITOR,onLoad:e=>this.handleSetThumbnailLoadingStatus("loaded"),onError:e=>this.handleSetThumbnailLoadingStatus("error")}),(0,ae.jsx)(Lp,{style:{background:"loading"===t?"linear-gradient(45deg, #8e96a4 0%, #c9d0de 100%)":"error"===t?"#000":"transparent"},children:r})}renderLoopThumbnail(e){const{file:t,customVideo:n,isBotDetected:r,playerMode:i}=this.props,o=r&&i===ie.V.NORMAL,a=t.thumbnailUrl;let s=t.url;return n&&e.customVideoId&&(s=n.url),s?(0,ae.jsx)(Lp,{children:(0,ae.jsx)(kp,{fromTime:e.fromTime,toTime:e.toTime,videoUrl:s,forceShowPreviewFallback:o,previewFallbackUrl:a,firstFrameUrl:e.firstFrameUrl,paused:this.props.playRequested,showBlur:this.props.playRequested})}):null}thumbnailRenderer(e){if(this.props.showOnlyFileThumbnail)return this.renderPreviewImage(this.props.file.thumbnailUrl);if(!e)return this.renderPreviewImage(this.props.file.thumbnailUrl);const t=e.type;switch(t){case"videoLoop":return this.renderLoopThumbnail(e);case"customImage":case"frameFromVideo":return this.renderPreviewImage(e.url);default:return console.error("Thumbnail thumbnailRenderer: unknown thumbnail type",t),null}}render(){const{thumbnail:e,isVisible:t}=this.props;return t?this.thumbnailRenderer(e):null}}const Np=(0,de.$j)(((e,t)=>{const n=e.sourceConfiguration.current?.playerConfig.funnelPlayerAddition?.isStartNode,r=e.thumbnail.thumbnail;return{videoWidth:e.dimensions.containerDimensions.width,thumbnail:r,isBotDetected:e.videoState.isBotDetected,isVisible:e.thumbnail.isVisible||t.playerMode===ie.V.THUMBNAIL_EDITOR,customVideo:Ao(e),showOnlyFileThumbnail:!1===n||!r||"customImage"===r.type&&!r.url||"frameFromVideo"===r.type&&r.url===jh.B,playRequested:e.videoState.isPlayRequested}})),Pp=Np((e=>{const{thumbnail:t}=e,n=(0,i.useMemo)((()=>t?"videoLoop"===t.type?`${t.fromTime}-${t.toTime}`:t.url:"-"),[t]);return(0,ae.jsx)(Thumbnail,{...e},n)}));var Dp=n(8223);const Bp=i.createContext(null);function Mp(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function Fp(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Up(e,t,n){var r=Mp(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r{const t=this.calcMousePosition(e);if(!t||!this.state.rectPosition||!this.context)return;const n={...this.state.rectPosition,x2:t.x,y2:t.y};this.context.handleRectangleSelectIntersection(n),this.setState({rectPosition:n})},this.handleMouseUp=e=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.setState({rectPosition:void 0})},this.handleMouseDown=e=>{const t=this.calcMousePosition(e);t&&this.context&&(this.context.deselectAll(),this.setState({rectPosition:{x1:t.x,y1:t.y,x2:t.x,y2:t.y}}),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp))},this.calcMousePosition=e=>({x:e.clientX,y:e.clientY}),this.state={rectPosition:void 0}}render(){const e=(()=>{if(!this.state.rectPosition||!this.wrapperRef.current)return;const{rectPosition:e}=this.state,t=this.wrapperRef.current.getBoundingClientRect();return{left:Math.min(e.x1,e.x2)-t.left,top:Math.min(e.y1,e.y2)-t.top,width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2)}})();return(0,ae.jsx)(Jp,{ref:this.wrapperRef,onMouseDown:this.handleMouseDown,children:(0,ae.jsx)($p,{style:e??{display:"none"}})})}}RectangleSelect.contextType=kf;const em=RectangleSelect,tm=G.ZP.div.withConfig({displayName:"GuideLinesContainer__Container",componentId:"sc-1twn12z-0"})(["width:100%;height:100%;pointer-events:none;position:absolute;top:0;left:0;"]),nm=(0,G.F4)(["0%{opacity:1;}100%{opacity:0}"]),rm=G.ZP.div.withConfig({displayName:"GuideLinesContainer__HorizontalLine",componentId:"sc-1twn12z-1"})(["pointer-events:none;position:absolute;width:100%;height:1px;left:0;top:",";background-color:#008eff;animation-name:",";animation-duration:0.5s;animation-iteration-count:1;animation-fill-mode:forwards;"],(({y:e})=>e+"px"),nm),im=G.ZP.div.withConfig({displayName:"GuideLinesContainer__VerticalLine",componentId:"sc-1twn12z-2"})(["pointer-events:none;position:absolute;height:100%;width:1px;top:0;left:",";background-color:#008eff;animation-name:",";animation-duration:0.5s;animation-iteration-count:1;animation-fill-mode:forwards;"],(({x:e})=>e+"px"),nm);class GuideLinesContainer extends i.Component{constructor(...e){super(...e),this.context=void 0}shouldComponentUpdate(e,t,n){return this.context.snappedToX!==n.snappedToX||this.context.snappedToY!==n.snappedToY}render(){const{snappedToX:e,snappedToY:t}=this.context;return(0,ae.jsxs)(tm,{children:[void 0!==t&&(0,ae.jsx)(rm,{y:t},t),void 0!==e&&(0,ae.jsx)(im,{x:e},e)]})}}GuideLinesContainer.contextType=kf;const om=i.createContext(void 0),am=(e,t)=>e.type===t;class VideoComponentRendererComp extends i.PureComponent{constructor(...e){super(...e),this.itemCopy=void 0}render(){const{item:e,onTimelineItemClick:t,onTimelineItemDismiss:n,...r}=this.props;e&&(this.itemCopy=e);const o=e||this.itemCopy;return o?(0,ae.jsx)(om.Consumer,{children:e=>{if(!e)throw new Error("Components context is not specified!");let a;return am(o,"text")?a=(0,ae.jsx)(e.PlainText,{...r,item:o}):am(o,"button")?a=(0,i.createElement)(e.Button,{...r,item:o,onClick:t,key:o.id}):am(o,"annotation")?a=(0,ae.jsx)(e.Annotation,{...r,item:o,onDismiss:n,onClick:t}):am(o,"imageAnnotation")?a=(0,ae.jsx)(e.ImageAnnotation,{...r,item:o,onDismiss:n,onClick:t}):am(o,"shareGate")?a=(0,ae.jsx)(e.ShareGate,{...r,item:o,onDismiss:n}):am(o,"turnstile")?a=(0,ae.jsx)(e.Turnstile,{...r,item:o,onDismiss:n}):am(o,"image")?a=(0,ae.jsx)(e.Image,{...r,item:o,onClick:t}):am(o,"grid")?a=(0,ae.jsx)(e.Grid,{...r,item:o,onButtonClick:t}):am(o,"survey")?a=(0,ae.jsx)(e.Survey,{...r,item:o,onButtonClick:t}):am(o,"quiz")?a=(0,ae.jsx)(e.Quiz,{...r,item:o,onDismiss:n}):(console.log("Do not know how to render",o.type),a=null),a}}):null}}const sm=(e=>{const t=t=>{const{id:n,forwardedRef:r,...o}=t,a=i.useContext(kf);if(!a)throw new Error("Component wrapped in detachableStoreHOC cannot be used outside of DetachableStoreProvider");const{detachedItemsById:s,attachItemToStore:l,attachAllItemsToStore:u,detachItemFromStore:c,detachAllItemsFromStore:d,detachSelectedItemsFromStore:h,attachSelectedItemsToStore:p,timelineItems:m,thumbnailItems:g,updateItem:v,swapZIndexes:y,selectedItemIds:b,updatePositionInTime:E,moveItem:S,itemWrapperHtmlElsRef:A,handleMultiDeselect:w,isThumbnailEditorActive:_}=a,T=m.find((e=>e.id===n))||g.find((e=>e.id===n));let O=!0,I=s[n];I||(O=!1,I=T);const x=i.useCallback((()=>c(n)),[n,c]),C=i.useCallback((()=>l(n)),[n,l]),k=i.useCallback((e=>v(n,e)),[n,v]),R=b.indexOf(n)>-1;return(0,ae.jsx)(e,{detachItemFromStore:x,detachAllItemsFromStore:d,detachSelectedItemsFromStore:h,attachSelectedItemsToStore:p,attachItemToStore:C,attachAllItemsToStore:u,updateItem:k,updateItemZIndexById:y,item:I,isDetached:O,isSelected:R,updatePositionInTime:E,moveItem:S,itemWrapperHtmlElsRef:A,selectedItemIds:b,handleMultiDeselect:w,isMultiSelect:b.length>1,isThumbnailEditorActive:_,ref:r,...o})};return i.memo(i.forwardRef(((e,n)=>(0,ae.jsx)(t,{...e,forwardedRef:n}))))})(VideoComponentRendererComp),lm=G.ZP.div.withConfig({displayName:"VideoItemsContainer__ContainerDiv",componentId:"sc-18pjg33-0"})(["position:absolute;height:100%;width:100%;left:0;top:0;z-index:4;pointer-events:none;> div{pointer-events:all;}"]),um=(0,G.ZP)((({buttonsScale:e,...t})=>(0,ae.jsx)(Vp,{...t}))).attrs((({buttonsScale:e})=>({style:{padding:20*e}}))).withConfig({displayName:"VideoItemsContainer__AnnotationsGroup",componentId:"sc-18pjg33-1"})(["height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;pointer-events:none !important;> div{pointer-events:all;}"]);class VideoItemsContainerComp extends i.Component{constructor(...e){super(...e),this.context=void 0,this.itemWrapperHtmlEls={},this.handleButtonClick=e=>{const{onTimelineItemClick:t}=this.props;t?.(e)},this.handleDismiss=(e,t)=>{const{onTimelineItemDismiss:n}=this.props;n?.(e,t)},this.handleWrapperMouseDown=e=>t=>{if(!this.context)return;const n=t.ctrlKey||t.metaKey||t.shiftKey;this.context.handleMultiSelect(e,n)},this.handleWrapperMouseDoubleClick=e=>()=>{this.context&&this.context.selectedItemIds.filter((t=>t!==e)).forEach(this.context.deselectItem)},this.setWrapperHtmlEl=e=>t=>{t?this.itemWrapperHtmlEls[e]=t:delete this.itemWrapperHtmlEls[e],this.props.itemWrapperHtmlElsRef.current=this.itemWrapperHtmlEls}}shouldComponentUpdate(e){const t=e.allItemsOnScreen,n=this.props.allItemsOnScreen;return this.props.buttonsScale!==e.buttonsScale||this.props.isThumbnailActive!==e.isThumbnailActive||this.props.hasStarted!==e.hasStarted||(i=t,!(!(r=n)&&!i||r&&i&&r.length===i.length&&r.every(((e,t)=>e===i[t]))));var r,i}render(){const{itemsOnScreen:e,annotationsOnScreen:t,buttonsScale:n,playerMode:r,isThumbnailActive:i,hasStarted:o,isFunnel:a}=this.props;return(0,ae.jsx)(se.Consumer,{children:({setContainer:s})=>(0,ae.jsxs)(lm,{ref:s,children:[(i||o)&&(0,ae.jsx)(Vp,{children:e.map((e=>(0,ae.jsx)(Zp,{timeout:{enter:0,exit:a?0:300},children:t=>(0,ae.jsx)(sm,{onTimelineItemClick:this.handleButtonClick,onTimelineItemDismiss:this.handleDismiss,animationState:t,id:e.id,buttonsScale:n,onWrapperMouseDown:this.handleWrapperMouseDown(e.id),onWrapperDoubleClick:this.handleWrapperMouseDoubleClick(e.id),wrapperRef:this.setWrapperHtmlEl(e.id)})},e.id)))}),(0,ae.jsx)(um,{buttonsScale:n,children:t.map((e=>(0,ae.jsx)(Zp,{timeout:{enter:0,exit:a?0:300},children:t=>(0,ae.jsx)(sm,{onTimelineItemClick:this.handleButtonClick,onTimelineItemDismiss:this.handleDismiss,animationState:t,id:e,buttonsScale:n,onWrapperMouseDown:this.handleWrapperMouseDown(e),wrapperRef:this.setWrapperHtmlEl(e),onWrapperDoubleClick:this.handleWrapperMouseDoubleClick(e)})},e)))}),[ie.V.TIMELINE_EDITOR,ie.V.THUMBNAIL_EDITOR].includes(r)&&(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(GuideLinesContainer,{}),(0,ae.jsx)(em,{})]})]})})}}VideoItemsContainerComp.contextType=kf;const cm=(0,de.$j)(((e,t)=>{const n=Uo(e),r=n.filter((e=>"annotation"===e.type||"imageAnnotation"===e.type)),i=n.filter((({type:e})=>"annotation"!==e&&"imageAnnotation"!==e));let o=0,a=0;return e.dimensions.isFullScreen&&(o=window.innerWidth-e.dimensions.containerDimensions.width>>1,a=window.innerHeight-e.dimensions.containerDimensions.height>>1),{buttonsOffsetX:o,buttonsOffsetY:a,isThumbnailActive:e.thumbnail.isVisible&&t.playerMode!==ie.V.TIMELINE_EDITOR,hasStarted:e.videoState.hasStarted,allItemsOnScreen:n,itemsOnScreen:i,annotationsOnScreen:r.sort(((e,t)=>e.zIndex-t.zIndex)).map((e=>e.id)),isFunnel:!!e.sourceConfiguration?.current?.funnelId}})),dm=cm(VideoItemsContainerComp),fm=G.ZP.div.withConfig({displayName:"DimmedBackground__DimmedBackgroundDiv",componentId:"sc-2rle53-0"})(["transition-property:opacity;transition-duration:0.2s;opacity:",";pointer-events:none;z-index:2;position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;"],(e=>e.isDimmed?.5:0));class DimmedBackground extends i.PureComponent{render(){const{isBackgroundDimmed:e}=this.props;return(0,ae.jsx)(fm,{isDimmed:e})}}const hm=(0,de.$j)((e=>({isBackgroundDimmed:Ho(e)})))(DimmedBackground);var pm=n(6126);const mm="chapters_wrapper__x4+DW",gm="chapters_visible__jiKei",vm="chapters_header__bGOAr",ym="chapters_content__ra6NV",bm="chapters_chapterLine__KEA1P",Em="chapters_closeButton__zcjUQ";class ChapterLine extends i.PureComponent{constructor(...e){super(...e),this.seek=()=>{this.props.seek(this.props.timestampSecond)}}render(){const{title:e,timestampSecond:t}=this.props;return(0,ae.jsxs)("div",{className:bm,onClick:this.seek,children:[(0,ae.jsx)("div",{children:e}),(0,ae.jsx)("div",{children:(0,of.q)(t)})]})}}const Sm=ChapterLine,Am=({player:e,playerMode:t})=>{const n=(0,de.I0)(),r=(0,i.useCallback)((()=>{n(Bt({isVisible:!1,initiatedBy:"click"}))}),[n]),o=(0,i.useCallback)((e=>{n((0,ee.ze)({time:e,type:"toTime"}))}),[n]),a=(0,de.v9)((e=>e.chapters.isVisible&&!Yo(e)))&&t!==ie.V.THUMBNAIL_EDITOR,s=e.chapters,l=Id(),u=(0,mc.tg)();if(!s||!s.enabled)return null;const{items:c}=s;return(0,ae.jsxs)("div",{...l,className:lc()(mm,{[gm]:a}),style:{height:`calc(100% - ${u.approximateBarHeight}px - 26px)`},children:[(0,ae.jsxs)("div",{className:vm,children:[(0,ae.jsxs)("h3",{children:[s.label,": "]}),(0,ae.jsx)("button",{className:Em,onClick:r,children:(0,ae.jsx)(pm.r,{"data-cy":"chapters-crossIcon"})})]}),(0,ae.jsx)("div",{className:ym,children:c.map(((e,t)=>(0,ae.jsx)(Sm,{title:e.title,timestampSecond:e.timestamp,seek:o},t)))})]})},wm="styles_line__EqpJ6",_m=({color:e,percentsFill:t,buttonsScale:n})=>(0,ae.jsx)("div",{className:wm,style:{width:`${t}%`,backgroundColor:e,height:5*n+"px"}}),Tm=e=>{const t=(0,de.v9)(Go);return(0,de.v9)(Vo)?(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(_m,{buttonsScale:e.buttonsScale,color:"#728898",percentsFill:100}),(0,ae.jsx)(_m,{buttonsScale:e.buttonsScale,color:"#fef4dd",percentsFill:t??0})]}):null};let Om=null;const Im=()=>{if(Om)return;if(!navigator.userAgent.indexOf("Opera"))return;if(!("MutationObserver"in window))return;Om=new MutationObserver((e=>{e.forEach((e=>{if("childList"===e.type&&e.addedNodes&&e.addedNodes.length>0){const t=e.addedNodes[0];if(!t||!t.shadowRoot)return;Array.from(t.shadowRoot?.childNodes).forEach((e=>{if("STYLE"===e.nodeName)return;const t=e.querySelector(".button-container");t&&(t.style.display="none",console.log("Opera - popOutButton/pictureInPicture disabled!"))}))}}))}));const e=document.getElementsByTagName("html");e&&e.length>0&&Om.observe(e[0],{childList:!0})};class VideoStateForLoaderListener{constructor(){this.delayTimeoutHandle=void 0,this.checkIntervalHandle=void 0,this.listener=void 0,this.isBuffering=e=>2===e||1===e,this.clearCheckInterval=()=>{this.checkIntervalHandle&&clearInterval(this.checkIntervalHandle),this.checkIntervalHandle=void 0},this.clearDelayTimeout=()=>{this.delayTimeoutHandle&&clearTimeout(this.delayTimeoutHandle),this.delayTimeoutHandle=void 0},this.listen=e=>{this.listener=e},this.notify=e=>{this.isBuffering(e())?this.delayTimeoutHandle=setTimeout((()=>{this.delayTimeoutHandle&&(this.clearDelayTimeout(),this.listener?.(!0),setInterval((()=>{this.isBuffering(e())||(this.clearCheckInterval(),this.listener?.(!1))}),1e3))}),500):(this.clearDelayTimeout(),this.clearCheckInterval(),this.listener?.(!1))}}}class HlsVideo extends i.PureComponent{constructor(...e){super(...e),this.video=void 0,this.videoStateListener=new VideoStateForLoaderListener,this.state={load:!1,quality:-1},this.timer=void 0,this.previousLoadedPercents=0,this.reportingVolumeChanges=!0,this.getIsMuted=()=>!!this.video&&this.video.muted,this.getIsPlaying=()=>!!this.video&&!this.video.paused,this.getCurrentTime=()=>this.video?.currentTime??0,this.seekAndBuffer=(e,t)=>{this.video&&(this.video.addEventListener("canplaythrough",t,{once:!0}),this.seek(e))},this.enableLoad=e=>{e&&this.props.isBotDetected||this.setState({load:!0})},this.play=async e=>{this.video&&(this.enableLoad(e),await this.video.play())},this.getVolume=()=>this.video?this.video.volume:1,this.pause=()=>{this.video&&this.video.pause()},this.seek=e=>{this.video&&(this.enableLoad(),this.video.currentTime=e)},this.setVolume=e=>{this.video&&(this.video.volume=e)},this.setMuted=e=>{this.video&&(this.video.muted=e)},this.getMuted=()=>!!this.video&&this.video.muted,this.pauseReportingVolumeChanges=()=>{this.reportingVolumeChanges=!1},this.resumeReportingVolumeChanges=()=>{this.reportingVolumeChanges=!0},this.setSpeed=e=>{this.video&&(this.video.playbackRate=e)},this.onError=e=>{const{onVideoSourceError:t}=this.props;t("string"==typeof e?e:e.details)},this.handleOnReady=()=>{this.props.onReady(),this.timer=window.setInterval(this.collectVideoData,500)},this.collectVideoData=()=>{if(!this.video)return;const e=this.video.buffered,t=this.video.currentTime;let n=e.length;const r=[];for(;n--;){const i=e.start(n),o=e.end(n);i<=t&&t<=o&&r.push(o)}const i=Math.max(...r),o=this.video.duration,a=o?i/o:0;a!==this.previousLoadedPercents&&(this.props.onPercentsLoaded(a),this.previousLoadedPercents=a)},this.registerRef=e=>t=>{this.video&&(this.video.removeEventListener("play",this.handleVideoPlayRequested),this.video.removeEventListener("playing",this.handleVideoStartPlaying),this.video.removeEventListener("pause",this.handleVideoStoppedPlaying),this.video.removeEventListener("volumechange",this.handleVideoVolumeChange),this.video.removeEventListener("ratechange",this.handleVideoRateChange),this.video.removeEventListener("timeupdate",this.handleTimeUpdate),this.video.removeEventListener("seeking",this.handleSeeking),this.video.removeEventListener("seeked",this.handleSeeked),this.video.removeEventListener("ended",this.handleEnded),this.video.removeEventListener("webkitendfullscreen",this.handleExitNativeFullscreen)),e(t),this.video=t,this.video&&(this.video.addEventListener("play",this.handleVideoPlayRequested),this.video.addEventListener("playing",this.handleVideoStartPlaying),this.video.addEventListener("pause",this.handleVideoStoppedPlaying),this.video.addEventListener("volumechange",this.handleVideoVolumeChange),this.video.addEventListener("ratechange",this.handleVideoRateChange),this.video.addEventListener("timeupdate",this.handleTimeUpdate),this.video.addEventListener("seeking",this.handleSeeking),this.video.addEventListener("seeked",this.handleSeeked),this.video.addEventListener("ended",this.handleEnded),this.video.addEventListener("webkitendfullscreen",this.handleExitNativeFullscreen))},this.handleEnded=()=>{this.video&&this.props.onEnded()},this.handleVideoPlayRequested=()=>{this.video&&this.props.onPlayRequested()},this.handleVideoStartPlaying=()=>{this.video&&this.props.onPlay()},this.handleVideoStoppedPlaying=()=>{this.video&&this.props.onPause()},this.handleVideoVolumeChange=()=>{this.video&&this.reportingVolumeChanges&&this.props.onVolumeChange(this.video.volume,this.video.muted)},this.handleVideoRateChange=()=>{this.video&&this.props.onRateChange(this.video.playbackRate)},this.handleTimeUpdate=()=>{this.videoStateListener.notify((()=>this.video?.readyState||0)),this.video&&this.props.onTimeUpdate(this.video.currentTime)},this.handleSeeking=()=>{this.video&&this.props.onSeeking(this.video.currentTime,"seeking")},this.handleSeeked=()=>{this.video&&this.props.onSeeking(this.video.currentTime,"seeked")},this.handleBotDetection=e=>{this.props.onBotDetection?.(e)},this.handleExitNativeFullscreen=()=>{this.video&&this.props.onExitNativeFullScreen()}}componentDidMount(){this.props.onMount(this),this.videoStateListener.listen(this.props.onVideoBufferingToggle),window.hlsVideo=this,Im()}getDuration(){return this.video?.duration??0}componentWillUnmount(){this.timer&&clearInterval(this.timer)}setQuality(e,t){this.setState({quality:e}),this.props.onQualityChange(e)}setIsFullscreen(e){e?this.video?.webkitEnterFullscreen():this.video?.webkitExitFullscreen()}render(){const{url:e,skipBotDetection:t,isBotDetected:n,autoplay:r,replacedAt:i}=this.props,{load:o,quality:a}=this.state;return(0,ae.jsx)(wp,{url:e,load:o,replacedAt:i,autoplay:r,quality:a,onError:this.onError,onReady:this.handleOnReady,onBotDetection:this.handleBotDetection,isBotDetected:n,skipBotDetection:t,children:({registerVideoRef:e})=>(0,ae.jsx)("video",{playsInline:!0,poster:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",crossOrigin:"anonymous",ref:_p(this.registerRef(e),this.props.videoRef)})})}}const xm=HlsVideo;const Cm=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e};var km=n(4073),Rm=1/0;const Lm=function(e){return e?(e=Ed(e))===Rm||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const Nm=function(e){var t=Lm(e),n=t%1;return t==t?n?t-n:t:0};var Pm=n(1001);const Dm=function(e,t,n){e=(0,Pm.Z)(e),t=(0,km.Z)(t);var r=e.length,i=n=void 0===n?r:Cm(Nm(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t};class NativeVideo extends i.Component{constructor(...e){super(...e),this.video=void 0,this.videoStateListener=new VideoStateForLoaderListener,this.videoRef=i.createRef(),this.sourceRef=i.createRef(),this.isComponentMounted=!1,this.isVideoBufferedFirstTime=!1,this.isReportingVolumeChanges=!0,this.isVolumeSetFirstTime=!1,this.isPlayRequestedFirstTime=!1,this.lastSeek=void 0,this.state={hlsUrl:void 0},this.getIsMuted=()=>this.video?.muted??!1,this.getIsPlaying=()=>!!this.video&&!this.video.paused,this.getCurrentTime=()=>this.video?.currentTime??0,this.seekAndBuffer=(e,t)=>{this.video&&(this.video.addEventListener("seeked",(()=>{this.isPlayRequestedFirstTime?this.video?.addEventListener("canplaythrough",(()=>{t()}),{once:!0}):t()}),{once:!0}),this.seek(e))},this.play=async()=>{this.video&&(this.isPlayRequestedFirstTime||(this.isPlayRequestedFirstTime=!0),await this.video.play())},this.getVolume=()=>this.video?.volume??1,this.pause=()=>{this.video?.pause()},this.seek=e=>{this.lastSeek=e,this.video&&(this.video.currentTime=e)},this.setVolume=e=>{this.video&&(this.isVolumeSetFirstTime||(this.isVolumeSetFirstTime=!0),this.video.volume=e)},this.setMuted=e=>{this.video&&(this.video.muted=e)},this.getMuted=()=>this.video?.muted??!1,this.setSpeed=e=>{this.video&&(this.video.playbackRate=e)},this.onError=()=>{const{onVideoSourceError:e}=this.props;e("")},this.handleEnded=()=>{this.video&&this.props.onEnded()},this.handleVideoPlayRequested=()=>{this.video&&this.props.onPlayRequested()},this.handleVideoStartPlaying=()=>{this.video&&this.props.onPlay()},this.handleVideoStoppedPlaying=()=>{this.video&&this.props.onPause()},this.handleVideoVolumeChange=()=>{this.video&&this.isVideoBufferedFirstTime&&this.isReportingVolumeChanges&&this.isVolumeSetFirstTime&&this.props.onVolumeChange(this.video.volume,this.video.muted)},this.handleTimeUpdate=()=>{this.videoStateListener.notify((()=>this.video?.readyState||0)),this.video&&(!this.lastSeek||Math.abs(this.lastSeek-this.video.currentTime)<1)&&4===this.video.readyState&&(this.props.onTimeUpdate(this.video.currentTime),this.lastSeek=void 0)},this.handleCanPlayThrough=()=>{this.isVideoBufferedFirstTime||(this.props.onReady(),this.isVideoBufferedFirstTime=!0)},this.handleVideoRateChange=()=>{this.video&&this.props.onRateChange(this.video.playbackRate)},this.handleSeeked=()=>{this.video&&this.props.onSeeking(this.video.currentTime,"seeked")},this.handleSeeking=()=>{this.video&&this.props.onSeeking(this.video.currentTime,"seeking")},this.handleExitNativeFullscreen=()=>{this.video&&this.props.onExitNativeFullScreen()},this.pauseReportingVolumeChanges=()=>{this.isReportingVolumeChanges=!1},this.resumeReportingVolumeChanges=()=>{this.isReportingVolumeChanges=!0}}componentDidMount(){if(this.isComponentMounted=!0,this.video=this.videoRef.current,this.videoStateListener.listen(this.props.onVideoBufferingToggle),this.video){this.props.onMount(this);const e=this.video;e.addEventListener("ended",this.handleEnded),e.addEventListener("playing",this.handleVideoStartPlaying),e.addEventListener("play",this.handleVideoPlayRequested),e.addEventListener("pause",this.handleVideoStoppedPlaying),e.addEventListener("volumechange",this.handleVideoVolumeChange),e.addEventListener("timeupdate",this.handleTimeUpdate),e.addEventListener("ratechange",this.handleVideoRateChange),e.addEventListener("error",this.onError),e.addEventListener("seeking",this.handleSeeking),e.addEventListener("seeked",this.handleSeeked),e.addEventListener("canplaythrough",this.handleCanPlayThrough),e.addEventListener("webkitendfullscreen",this.handleExitNativeFullscreen),setTimeout((()=>{this.isComponentMounted&&this.props.onReady()}))}this.sourceRef.current&&this.sourceRef.current.addEventListener("error",this.onError),Im()}componentDidUpdate(e,t){if((t.hlsUrl!==this.state.hlsUrl||e.url!==this.props.url)&&this.video){const t=this.video.currentTime;this.getIsPlaying()&&this.video.addEventListener("loadeddata",(()=>{this.play()}),{once:!0}),this.video.load(),this.video.currentTime=(e.url!==this.props.url?this.props.nextCurrentTime:void 0)??t,this.videoStateListener.notify((()=>this.video?.readyState||0))}e.url!==this.props.url&&(this.setState({hlsUrl:void 0}),this.isPlayRequestedFirstTime=!1,this.isVideoBufferedFirstTime=!1)}componentWillUnmount(){if(this.isComponentMounted=!1,this.video){const e=this.video;e.removeEventListener("ended",this.handleEnded),e.removeEventListener("playing",this.handleVideoStartPlaying),e.removeEventListener("play",this.handleVideoPlayRequested),e.removeEventListener("pause",this.handleVideoStoppedPlaying),e.removeEventListener("volumechange",this.handleVideoVolumeChange),e.removeEventListener("timeupdate",this.handleTimeUpdate),e.removeEventListener("ratechange",this.handleVideoRateChange),e.removeEventListener("error",this.onError),e.removeEventListener("seeking",this.handleSeeking),e.removeEventListener("seeked",this.handleSeeked),e.removeEventListener("canplaythrough",this.handleCanPlayThrough),e.removeEventListener("webkitendfullscreen",this.handleExitNativeFullscreen)}this.sourceRef.current&&this.sourceRef.current.removeEventListener("error",this.onError)}getDuration(){return this.video?.duration??0}setQuality(e,t){this.video&&this.sourceRef.current&&(this.setState({hlsUrl:t}),this.props.onQualityChange(e))}setIsFullscreen(e){e?this.video?.webkitEnterFullscreen():this.video?.webkitExitFullscreen()}render(){const{url:e,loop:t,muted:n,replacedAt:r}=this.props,{hlsUrl:i}=this.state;let o=i||e;o=r?`${o}?v=${Math.floor(new Date(r).getTime()/1e3)}`:o;const a=Dm(o,".mp4");return(0,ae.jsx)("video",{playsInline:!0,controls:!1,crossOrigin:"anonymous",ref:_p(this.videoRef,this.props.videoRef),muted:n,poster:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",loop:t,children:a?(0,ae.jsx)("source",{src:o,type:"video/mp4",ref:this.sourceRef}):(0,ae.jsx)("source",{src:o,type:"application/x-mpegURL",ref:this.sourceRef})})}}const Bm=NativeVideo,Mm=({streamingUrl:e,replacedAt:t,registerVideoApi:n,player:r,onVideoSourceError:o,onVideoBufferingToggle:a,onBotDetection:s,videoRef:l})=>{const u=(0,de.I0)(),c=(0,de.v9)(bo.Zh),d=(0,de.v9)(bo.OE),h=(0,de.v9)(Io.TG),p=(0,de.v9)(bo.m2);let m=ts()?Bm:xm;Dm(e,".mp4")&&(m=Bm);const g=(0,i.useCallback)((()=>{u((0,ee.wF)())}),[u]),v=(0,i.useCallback)((()=>{u((0,ee.zJ)())}),[u]),y=(0,i.useCallback)((()=>{u((0,ee.K)())}),[u]),b=(0,i.useCallback)((()=>{u((0,ee.x9)())}),[u]),E=(0,i.useCallback)(((e,t)=>{u((0,ee.ni)({volume:e,muted:t}))}),[u]),S=(0,i.useCallback)((e=>{u((0,ee.yj)(e))}),[u]),A=(0,i.useCallback)((e=>{c||u((0,ee.b3)({newTime:e}))}),[u,c]),w=(0,i.useCallback)((e=>{c||u((0,ee.Gq)(e))}),[u,c]),_=(0,i.useCallback)(((e,t)=>{u((0,ee.BN)({time:e,seekType:t}))}),[u]),T=(0,i.useCallback)((e=>{c||u((0,ee.gp)({quality:e}))}),[u,c]),O=(0,i.useCallback)((()=>{u((0,ee.Wn)())}),[u]),I=(0,i.useCallback)((()=>{u(Xt(!1))}),[u]),x={url:e,replacedAt:t,autoplay:r.general.autoplay,loop:"LOOP"===r.general.onEnd.action,muted:r.general.muted,onMount:n,onVideoSourceError:o,onReady:g,onPlayRequested:v,onPlay:y,onPause:b,onVolumeChange:E,onQualityChange:T,onRateChange:S,onTimeUpdate:A,onPercentsLoaded:w,onSeeking:_,onEnded:O,onExitNativeFullScreen:I,nextCurrentTime:d,onVideoBufferingToggle:a,onBotDetection:s,isBotDetected:h,skipBotDetection:p!==ie.V.NORMAL,videoRef:l};return(0,ae.jsx)(m,{...x})},Fm=i.lazy((()=>Promise.all([n.e(108),n.e(187)]).then(n.bind(n,9187)))),Um=e=>(0,de.v9)(Rf.w)?(0,ae.jsx)(i.Suspense,{fallback:null,children:(0,ae.jsx)(Fm,{...e})}):null,jm=(0,i.memo)(Um),Hm=(0,i.createContext)([]),Vm={"align-right":"right","align-center":"center","align-left":"left"},Gm={"align-right":"flex-end","align-center":"center","align-left":"flex-start"},zm=e=>{const t=e.find((e=>!!Vm[e]));return t?Vm[t]:"left"},Xm=e=>{const t=e.find((e=>!!Gm[e]));return t?Gm[t]:"flex-start"};const Wm=G.ZP.div.withConfig({displayName:"Subtitles__StyledSubtitlesHolder",componentId:"sc-1kclg6-0"})(["position:absolute;z-index:2;width:100%;left:0;right:0;bottom:0;margin:auto;transition:transform 0.2s ease-out;"]),Qm=G.ZP.div.withConfig({displayName:"Subtitles__StyledSubtitles",componentId:"sc-1kclg6-1"})(["font-size:0;"]),qm=G.ZP.span.withConfig({displayName:"Subtitles__StyledSubtitlesLine",componentId:"sc-1kclg6-2"})(["display:inline-block;white-space:pre-wrap;"]),Km=({buttonsScale:e,player:t,file:r})=>{const o=t.skin.subtitles||{fontFamily:"Roboto",fontSize:16,fontStyle:[],textAlign:"align-center",color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)",showByDefault:!1},a=t.subtitles,s=(0,i.useContext)(Hm);(e=>{const t=(0,i.useRef)(""),[r,o]=(0,i.useState)(void 0);Wf((()=>{if(!e)return;if(document.getElementById("voomly-subtitles-google-fonts-preconnect"))return;const t=document.createElement("link");t.id="voomly-subtitles-google-fonts-preconnect",t.rel="preconnect",t.href="https://fonts.googleapis.com",document.head.appendChild(t)})),(0,i.useEffect)((()=>{e&&"sans-serif"!==e&&(async()=>{const r=new Set,i=await n.e(224).then(n.bind(n,6224));r.add(i.createFontLinkStringByFamily(e));const a=["https://fonts.googleapis.com/css2?",Array.from(r).join("&"),"&display=swap"].join(""),s=document.getElementById("voomly-subtitles-google-fonts");if(a===t.current)return t.current;if(t.current=a,s)s.href=a;else{const e=document.createElement("link");e.id="google-fonts",e.rel="stylesheet",e.href=a,document.head.appendChild(e)}o(a)})()}),[e])})(o.fontFamily);const l=(0,mc.tg)(),u=(0,de.v9)(Io.Xn),c=(0,de.v9)(Sa),d=(0,de.v9)(Gf),h=(0,de.v9)(zf),[p,m]=(0,i.useState)(void 0),g=(0,i.useMemo)((()=>a?.items.filter((e=>e.isEnabled))||[]),[a?.items]);(0,i.useEffect)((()=>{(async()=>{if(m(void 0),h&&d){const n=g.find((e=>e.name===h));if(!n||n.subtitlesId.includes("NON_EXISTING_SUBTITLES_ID"))return;const[i,o]=await(0,ue.Z)((e=r.id,t=n.subtitlesId,Tl.default.get((0,Ol.b)(`/files/${e}/subtitles/${t}`))));if(i)return void console.log("Subtitles error: ",i.message);o&&m(o.data.content)}var e,t})()}),[h,r.id,d,g]);const v=(0,i.useMemo)((()=>s.length?s:p?.items||[]),[s,p]);if(!d&&!s.length)return null;const y=10+l.approximateBarHeight;return(0,ae.jsx)(Wm,{style:{textAlign:zm([o.textAlign]),padding:`0 ${15*e}px`,transform:`translateY(-${c?y:10}px)`},children:v.map((t=>u>=t.startTime&&u(0,ae.jsx)(Qm,{children:(0,ae.jsx)(qm,{style:{backgroundColor:o.backgroundColor,color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize*e+"px",lineHeight:1.12*o.fontSize*e+"px",fontWeight:o.fontStyle.includes("bold")?"bold":void 0,fontStyle:o.fontStyle.includes("italic")?"italic":void 0,textDecoration:`${o.fontStyle.includes("underline")?"underline":""} ${o.fontStyle.includes("line-through")?"line-through":""}`,padding:`${2*e}px ${5*e}px`},children:n})},`${t.startTime}-${t.endTime}-${r}`))):null))})},Ym=(0,i.memo)(Km),Zm=(0,i.createContext)(void 0),Jm=Zm.Provider,$m=i.lazy((()=>Promise.all([n.e(108),n.e(472),n.e(411)]).then(n.bind(n,4411)).then((({VideoError:e})=>({default:e}))))),eg=G.ZP.div.withConfig({displayName:"VideoWithControls__StyledVideoRoot",componentId:"sc-6vd40j-0"})(["position:relative;display:flex;align-items:center;justify-content:center;&,video{height:100%;width:100%;}"]),tg=G.ZP.div.withConfig({displayName:"VideoWithControls__StyledWrapper",componentId:"sc-6vd40j-1"})(["position:absolute;left:0;top:0;width:100%;height:100%;transition:filter ","ms ease-out;filter:",";"],400,(({$isBlurry:e})=>`blur(${e?10:0}px)`)),ng=G.ZP.div.withConfig({displayName:"VideoWithControls__StyledOldVideoFrameImageWrapper",componentId:"sc-6vd40j-2"})(["position:absolute;left:0;top:0;width:100%;height:100%;filter:blur(10px);display:flex;justify-content:center;align-items:center;background:#000;"]),rg=G.ZP.img.withConfig({displayName:"VideoWithControls__StyledOldVideoFrameImage",componentId:"sc-6vd40j-3"})(["width:100%;height:100%;object-fit:contain;"]),ig=(0,G.ZP)(ld.a).withConfig({displayName:"VideoWithControls__StyledLoader",componentId:"sc-6vd40j-4"})(["position:absolute;z-index:50;top:50%;left:50%;transform:translate(-50%,-50%);"]),og=G.ZP.div.withConfig({displayName:"VideoWithControls__StyledVideoWrapper",componentId:"sc-6vd40j-5"})(["position:absolute;left:0;top:0;width:100%;height:100%;opacity:",";"],(({$isHidden:e})=>e?"0":"1")),ag=og,sg=({player:e,file:t,playerMode:n,error:r,onError:o,onTimelineItemClick:a,onTimelineItemDismiss:s,allControlsAreAlwaysVisible:l,onRegisterVideoAPI:u})=>{const c=(0,de.I0)(),d=(0,i.useRef)(null),h=(0,de.v9)(bo.gh),p=(0,i.useRef)(null),m=(0,i.useContext)(Zm),[g,v]=(0,i.useState)(),[y,b]=(0,i.useState)(!1),[E,S]=(0,i.useState)(),A=(0,i.useRef)(null),[w,_]=(0,i.useState)(!1),[T,O]=(0,i.useState)(),[I,x]=(0,i.useState)(),C=w&&void 0!==I;(0,i.useEffect)((()=>(p.current=document.createElement("canvas"),()=>{p.current?.remove()})),[]);const k=fe(h);(0,i.useEffect)((()=>{if(k||!h)return;const e=p.current?.getContext("2d");if(p.current&&d.current){p.current.width=d.current.videoWidth,p.current.height=d.current.videoHeight,e?.drawImage(d.current,0,0);try{p.current.toBlob((e=>{e&&S(URL.createObjectURL(e))}),"image/jpeg")}catch(t){_(!0)}}}),[k,h]),(0,i.useEffect)((()=>{!k&&h&&(d.current&&x(d.current.currentTime),O(t.url))}),[k,h,t.url]),(0,i.useEffect)((()=>{if(!h){if(v(!1),w)return void x(void 0);S(void 0)}}),[h,w]);const R=(0,i.useCallback)((()=>{setTimeout((()=>{v(!0)}),400)}),[]),L=(0,i.useCallback)((()=>{v(!0)}),[]),N=(0,i.useCallback)((e=>{c((0,ee.$G)({api:e})),u()}),[c,u]),P=(0,de.v9)(la.y3),D=(0,de.v9)(Io.xI),B=(0,de.v9)(Io.F7),M=(0,i.useCallback)((e=>{console.log("Video Source Error",e),o("VIDEO_SOURCE_ERROR")}),[o]),F=(0,i.useCallback)((e=>{b(e)}),[]),U=(0,i.useCallback)((e=>{c((0,ee.cX)(e)),e&&b(!1)}),[c]);if(r||!t.url)return(0,ae.jsx)(i.Suspense,{fallback:null,children:(0,ae.jsx)($m,{errorType:r,videoConvertProgress:t.videoConvertProgress,onTryAgain:m})});const H={playerMode:n,file:t,player:e,buttonsScale:P,allControlsAreAlwaysVisible:l},V=h?.file?.url&&g?h?.file?.url:t.url,G=h?.file?.url&&g?h?.file?.replacedAt:t.replacedAt;return(0,ae.jsxs)(eg,{"data-cy":"videoWithControls-videoRoot",children:[(0,ae.jsxs)("div",{"data-cy":"videoWithControls-videoWrapper",style:{opacity:n!==ie.V.THUMBNAIL_EDITOR&&B?1:0},children:[(0,ae.jsxs)(tg,{$isBlurry:!!h,children:[(0,ae.jsx)(og,{$isHidden:!!h&&g,children:(0,ae.jsx)(Mm,{videoRef:d,replacedAt:G,streamingUrl:V,player:e,registerVideoApi:N,onVideoSourceError:M,onVideoBufferingToggle:F,onBotDetection:U})}),(0,ae.jsx)(ag,{$isHidden:!C,children:void 0!==I&&w&&T&&(0,ae.jsx)(Op,{url:T,onCanPlay:L,fromTime:I,videoRef:A})})]}),E&&(0,ae.jsx)(ng,{children:(0,ae.jsx)(rg,{src:E,onLoad:R,alt:t.name})}),(0,ae.jsx)(ig,{isVisible:y,withBackground:!1,color:e.skin.bgColorEnabled?e.skin.bgColor:void 0})]}),(n!==ie.V.MINI_PLAYER||D)&&(0,ae.jsx)(Pp,{...H}),(0,ae.jsx)(hm,{...H}),(0,ae.jsx)(Am,{...H}),(0,ae.jsx)(Ym,{...H}),(0,ae.jsx)(kf.Consumer,{children:e=>e?(0,ae.jsx)(dm,{onTimelineItemClick:a,onTimelineItemDismiss:s,buttonsScale:P,playerMode:n,itemWrapperHtmlElsRef:e.itemWrapperHtmlElsRef}):null}),(0,ae.jsx)(jm,{...H}),(0,ae.jsx)(Tm,{...H})]})};var lg,ug=[],cg="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(lg||(lg={}));var dg,fg=function(e){return Object.freeze(e)},hg=function(e,t){this.inlineSize=e,this.blockSize=t,fg(this)},pg=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,fg(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),mg=function(e){return e instanceof SVGElement&&"getBBox"in e},gg=function(e){if(mg(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},vg=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},yg="undefined"!=typeof window?window:{},bg=new WeakMap,Eg=/auto|scroll/,Sg=/^tb|vertical/,Ag=/msie|trident/i.test(yg.navigator&&yg.navigator.userAgent),wg=function(e){return parseFloat(e||"0")},_g=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new hg((n?t:e)||0,(n?e:t)||0)},Tg=fg({devicePixelContentBoxSize:_g(),borderBoxSize:_g(),contentBoxSize:_g(),contentRect:new pg(0,0,0,0)}),Og=function(e,t){if(void 0===t&&(t=!1),bg.has(e)&&!t)return bg.get(e);if(gg(e))return bg.set(e,Tg),Tg;var n=getComputedStyle(e),r=mg(e)&&e.ownerSVGElement&&e.getBBox(),i=!Ag&&"border-box"===n.boxSizing,o=Sg.test(n.writingMode||""),a=!r&&Eg.test(n.overflowY||""),s=!r&&Eg.test(n.overflowX||""),l=r?0:wg(n.paddingTop),u=r?0:wg(n.paddingRight),c=r?0:wg(n.paddingBottom),d=r?0:wg(n.paddingLeft),h=r?0:wg(n.borderTopWidth),p=r?0:wg(n.borderRightWidth),m=r?0:wg(n.borderBottomWidth),g=d+u,v=l+c,y=(r?0:wg(n.borderLeftWidth))+p,b=h+m,E=s?e.offsetHeight-b-e.clientHeight:0,S=a?e.offsetWidth-y-e.clientWidth:0,A=i?g+y:0,w=i?v+b:0,_=r?r.width:wg(n.width)-A-S,T=r?r.height:wg(n.height)-w-E,O=_+g+S+y,I=T+v+E+b,x=fg({devicePixelContentBoxSize:_g(Math.round(_*devicePixelRatio),Math.round(T*devicePixelRatio),o),borderBoxSize:_g(O,I,o),contentBoxSize:_g(_,T,o),contentRect:new pg(d,l,_,T)});return bg.set(e,x),x},Ig=function(e,t,n){var r=Og(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case lg.DEVICE_PIXEL_CONTENT_BOX:return a;case lg.BORDER_BOX:return i;default:return o}},xg=function(e){var t=Og(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=fg([t.borderBoxSize]),this.contentBoxSize=fg([t.contentBoxSize]),this.devicePixelContentBoxSize=fg([t.devicePixelContentBoxSize])},Cg=function(e){if(gg(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},kg=function(){var e=1/0,t=[];ug.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new xg(t.target),i=Cg(t.target);r.push(n),t.lastReportedSize=Ig(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Lg=function(){var e,t=0;for(Rg(t);ug.some((function(e){return e.activeTargets.length>0}));)t=kg(),Rg(t);return ug.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:cg}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=cg),window.dispatchEvent(e)),t>0},Ng=[],Pg=function(e){if(!dg){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Ng.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),dg=function(){n.textContent="".concat(t?t--:t++)}}Ng.push(e),dg()},Dg=0,Bg={attributes:!0,characterData:!0,childList:!0,subtree:!0},Mg=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fg=function(e){return void 0===e&&(e=0),Date.now()+e},Ug=!1,jg=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Ug){Ug=!0;var n,r=Fg(e);n=function(){var n=!1;try{n=Lg()}finally{if(Ug=!1,e=r-Fg(),!Dg)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Pg((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Bg)};document.body?t():yg.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Mg.forEach((function(t){return yg.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Mg.forEach((function(t){return yg.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Hg=function(e){!Dg&&e>0&&jg.start(),!(Dg+=e)&&jg.stop()},Vg=function(){function e(e,t){this.target=e,this.observedBox=t||lg.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Ig(this.target,this.observedBox,!0);return e=this.target,mg(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Gg=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},zg=new WeakMap,Xg=function(e,t){for(var n=0;n=0&&(i&&ug.splice(ug.indexOf(n),1),n.observationTargets.splice(r,1),Hg(-1))},e.disconnect=function(e){var t=this,n=zg.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Qg=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Wg.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!vg(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Wg.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!vg(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Wg.unobserve(this,e)},e.prototype.disconnect=function(){Wg.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const qg="undefined"!=typeof ResizeObserver?ResizeObserver:Qg,Kg=e=>parseFloat(e)||0,Yg=(e,t)=>{const n=e.getElementsByClassName(t);for(let r=0;r{const t=getComputedStyle(e),n=Kg(t.paddingLeft)+Kg(t.paddingRight),r=Kg(t.paddingTop)+Kg(t.paddingBottom),i=Kg(t.borderLeftWidth)+Kg(t.borderRightWidth),o=Kg(t.borderTopWidth)+Kg(t.borderBottomWidth),a=e.getBoundingClientRect();return{width:a.width-n-i,height:a.height-r-o}};function Jg({ratio:e,isFullScreen:t}){const[n,r]=(0,i.useState)(window.innerWidth>window.innerHeight),o=fe(e),a=(0,i.useRef)(`resize-helper-${nt().v4()}`),[s,l]=(0,i.useState)(null),u=(0,i.useRef)(void 0),[c,d]=(0,i.useState)(void 0),[{width:h,height:p},m]=(0,i.useState)({width:0,height:0}),g=(0,i.useCallback)((e=>{l(e)}),[]),v=(0,i.useCallback)((t=>{const{width:n,height:r}=Zg(t),{width:i,height:o}=((e,t,n)=>({width:Math.min(t,n*e),height:Math.min(n,t/e)}))(e,n,r);d(!0),u.current=!0,Yg(t,a.current),m({width:i,height:o})}),[e]),y=(0,i.useCallback)((n=>{window.requestAnimationFrame((()=>{let r=0,i=0;if(n[0]?.contentBoxSize?.[0]?.inlineSize&&n[0]?.contentBoxSize?.[0]?.blockSize){const{inlineSize:e,blockSize:t}=n[0].contentBoxSize[0];r=e,i=t}else n[0]?.contentRect?.width&&n[0]?.contentRect?.height&&(r=n[0].contentRect.width,i=n[0].contentRect.height);const o=n[0].target;if(!e)throw new Error("Can't set Layout dimensions");void 0!==t&&t?m({width:Math.min(r,i*e),height:Math.min(i,r/e)}):(((e,t,n)=>{Yg(e,t);const r=document.createElement("div");r.className=t,r.style.opacity="0",r.style.height=n?`${n}px`:"300px",e.appendChild(r)})(o,a.current),v(o))}))}),[e,t,v]);return(0,i.useLayoutEffect)((()=>{const t=s?.parentElement;t&&o!==e&&v(t)}),[v,s?.parentElement,o,e]),(0,i.useLayoutEffect)((()=>{const e=()=>{const e=s?.parentElement,t=window.innerWidth>window.innerHeight;e&&t!==n&&(r(t),v(e))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[v,n,s?.parentElement]),(0,i.useLayoutEffect)((()=>{if(!s?.parentElement)return;const{width:t}=Zg(s.parentElement);m({width:t,height:t/e})}),[s]),(0,i.useLayoutEffect)((()=>{if(!s)return;const e=s.parentElement;if(!e)throw new Error("Parent element not found");const n=new qg(y);if(void 0!==t&&t){const t=e?.querySelector(`.${Bd.fullscreen}`)||e?.querySelector(`.${Bd.fullsceenSimulated}`);t?n.observe(t):console.error("Looks like fullscreen is enabled, but fullscreen DIV not found.")}else n.observe(e);return()=>{n.disconnect()}}),[s,y,t]),(0,i.useMemo)((()=>[g,{width:h,height:p},Boolean(c),s]),[g,h,p,c,s])}const $g=G.ZP.div.withConfig({displayName:"VideoLayout__StyledStretchedVideoWrapper",componentId:"sc-j7bbfv-0"})(["position:absolute;inset:-1px;margin:auto;"]),ev=({videoRatio:e,children:t})=>{const n=(0,de.I0)(),r=(0,de.v9)(la.yz),o=(0,de.v9)(la.Gu),a=(0,de.v9)(la.ww),s=(0,de.v9)(wa),[l,{width:u,height:c}]=Jg({type:"video",ratio:e,isFullScreen:r});return(0,i.useLayoutEffect)((()=>{u&&c&&n(zt({width:u,height:c}))}),[n,u,c]),(0,ae.jsx)("div",{ref:l,style:{position:"relative",overflow:"hidden",width:o,height:a,cursor:s?"auto":"none"},children:(0,ae.jsx)($g,{children:t})})},tv=(0,i.memo)(ev),nv=n.p+"iphone.png",rv=n.p+"iphone.webp",iv=n.p+"macbook.png",ov=n.p+"macbook.webp",av=n.p+"skin-02.png",sv=n.p+"skin-02.webp",lv=e=>{const t=uv.find((({key:e})=>"iphone"===e));if(!t)throw new Error("Something went wrong. Could not find default border skin.");if(!e)return console.log("No border skin key, used default"),t;const n=uv.find((t=>t.key===e));return n||(console.log(`No border skin found for the key ${e}, used default`),t)},uv=[{key:"iphone",label:"iPhone",image:{original:nv,webp:rv},width:2590,height:1295,borderRadius:0,gutter:{top:3.2,right:6.2,bottom:3.19,left:6.99}},{key:"macbook",label:"Macbook",image:{original:iv,webp:ov},width:3154,height:1848,gutter:{top:3.4,right:10.4,bottom:5.6,left:10.2}},{key:"skin1",label:"Skin 1",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,UklGRrIBAABXRUJQVlA4TKUBAAAv58OPEGDcto0k9d/23m9jwQgGka0EIgoF6GAUIxCBOGoKEpDhFyCB3n1HbtsGEj0zm9t+Q0jul+Wdqu7GAa9bV508S16vCHHMC8WXa99HWsZRr0wfNOKw17jVjNNe8+le+JnGeS89K/etPP9rHPiKQ1i4cP4d+U/YuJBkceTL8pXLWyvXrlauqleu7q5cN+5/yWrHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/z3y/GbX3fm7877DWLnPSbRnnlfUey8lyx23j8YM+8ZjZ33CcfQe8Nj5D/FzHtAZOd9PzLzXi+ZeX+fzLynU2bexytL792WN8e0r5n3aEwCAA=="},width:1e3,height:576,gutter:{top:1.9,right:2.3,bottom:1.9,left:2.4}},{key:"skin2",label:"Skin 2",image:{original:av,webp:sv},width:1006,height:582,gutter:{top:.9,right:1.4,bottom:.9,left:1.1}},{key:"skin3",label:"Skin 3",image:{original:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA/IAAAJKCAMAAAC4Uo6mAAAAeFBMVEUAAAAAAAAAAAD/WlUAAAAAAAAAAAD/WlX+WVQAAAD/WlX/WlX/WlX/WlX/WlU5FBP/WlX/WlX/WlX/WlX/WlX6WFP/WlX0VlH/WlXwVFD/WlXnUk3/WlXCREG4QT25QT7/WlX5WFP2V1LsU06gODX/WlX/WlX/WlV0zp8PAAAAJ3RSTlMAGhj7BBQO7O8Gz7aONiQgCfQxLv7Z1bevpZuNgFNJQj7Vv5o7BwZQidVjAAAIjklEQVR42uzay1LCQBBG4Z5cSCAhBoKIiGU20u//hpIKZRkkjlv+Ot96tqfm1jZ17k+HfZE6gAeVFvvDqT/bf2yPhQMQUB63FtNVOwcgYld19pe25jgPSEnr1mY1KwcgZtXYjDWXeEBQsZ4pfuMABG3uNt+wxwOiisZ+abnHA7JWrd2qHYCs2m50/M4BwtLOpioHIKyyiS0zd4C03UdmPxwdgLTXsLBvn6UDkFY+hTyzq94BiHsPIVna6OQAxL2Fi2vzBwcg7iVcJJkN9g5A3HMY5DZgvB6QV4bB+G6f+gwD8Gj8vjSMsmEJyQMyfEYY5SQPSIkkHzKSB5TEkl+QPKAklnxC8oCSWPJhSfKAkGjyC5IHhESTz0keEBJNPiF5QAjJ44t9OiYCAAABIHT2L20Edx86QMpZfpSHR5SHFOUhRXlIUR5SlIcU5SFFeUhRHlKUhxTlIUV5SFEeUpSHFOUhRXlIUR5SlIcU5SFFeUhRHlKUhxTlIUV5SFEeUpSHFOUhRXlIUR5SlGfZpwMBAAAAAEH+1oNcDrGiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rAS+3QgAAAAACDI33qQyyHlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXliX06EAAAAAAQ5G89yOUQK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK7FPBwIAAAAAgvytB7kcUh5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUZ7YpwMBAAAAAEH+1oNcDrGiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rAS+3QgAAAAACDI33qQyyHlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXliX06EAAAAAAQ5G89yOUQK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK8rDivKwojysKA8rysOK8rCiPKwoDyvKw4rysKI8rCgPK7FPBwIAAAAAgvytB7kcUh5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUR5WlIcV5WFFeVhRHlaUhxXlYUV5WFEeVpSHFeVhRXlYUZ7at7udhIEggMIz2+3aKlLAICJS5Mfs+7+hhhDddjHhltnzvcPJdNopikLyQFFIHigKyQNFIXmgKCQPFIXkgaKQPFAUkgeKQvJAUUgeKMoNyVcRgHFVkvxDBGBckyT/GgEYt0ySf4sAjFslyX9EAMZtkuQ/IwDjtknyX00EYNq8S5KX9wjAtLWmyS8iANP6QfLyFAEYdtBh8gsO8ADDqt0oeZlEAGYdNeHkx+wxAjBq32XJy5RDe8Coh5Omajl7nkcABs17HQhyaZ45DxjU9DrUysWUfR4wZ3/SEfk1m/CtDjClOnY6EiTxwk0OYMhhpxkvA7s1/9gAJjTrXnO1DHnttpvVsuERH7hbVbNcbbadXuNlJCgAs4JkagVgVC057xSASc7LFa0CMKmVq1rmPGCQa+Ufnn0eMKf28of39oBxQc4Y9EAJshGf84GVHjDBBS83aUPt6B64Y87VoZWhbzQeAt1mzO7aAAAAAElFTkSuQmCC",webp:"data:image/webp;base64,UklGRvYCAABXRUJQVlA4TOoCAAAv8UOSED/BoJEkRXX+XZ4Apue3Mf8MGklSVOdf5TlgflAQACCiu+3wwCVn3LKoBQAIEAQYCND/V1DAoBAYePiPXLc+q+SSqqJYsuReX59aI7ip/9PVAXW7/HLg4xG3J7xe9nrB5yeXkz8f/v309fLfjwEBS7LtNtGTg8g5Z7AR2v8aAcnM762pE9H/CbDM6Wh1vDUhindobsfVaGp/crBropC3u8Hv+qdXFPPXqf+b8TpEQQ/r8Q961yjq115nwybKejPsaPiMwv4cdtJrorQ3vQ7G1yju13HeOsr7Oqsf9C30c05R4E8Zg5fCvWYuaRcl/uDLhEmrce3GV+7LKIr80vu6+LRSua333hcfjip3fqvd203lHm++emtUrv3gSzML3ZlqdxY+eWcWVS5+qQTPO8ErBa8WPF8IXil4leDV/+J5/If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/wnbKE7NQ8pjcq1KTeVe6QcVe6cslK5bcpI5ZYpk1bjnpsU22ncwScNNG6RZieFu/iMQdC3MMuxtb7tfXJtZuOrut03edZrtK2Z+/TqzYZPZXsufGb5wYaNrrULn1t8st5V1e5zn23fx+ugaGG/8dllgln/pGeXme/QJZnNDq2StYeF77KyTOc3y+350Qb1Cu3jvF1ufLcux0ov76XlV+pWWYeu1rbadWGFthXWbVHrWl1Y165StcrZD0tNK+23rtKzytnPXVkrWV06+5tFWdW1ftV1VRaWCw=="},width:1010,height:586,gutter:{top:1.9,right:3.3,bottom:3,left:2.4}},{key:"skin4",label:"Skin 4",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,UklGRtgBAABXRUJQVlA4TMwBAAAv6MOPEF+gkJEkNndfDd7gjbpCRpLY3H01eIM36goZSWJz99XgDd6oz38AAKC7iwhVhYj8P1VlZjKTmXF3cNvItqvwS8C7KsiIbQG+H1Jy34bntce/HJEd6YmN6L8bSJLcpPEukwTITQRBVTwUFRcP8lCVOyN95h4g3mifPg6XWc1MwlAVGjxT+TA0kzBUhbYpsDPzQhmqItcUHRpeUoaqyD3U8pIyVEXeoZ6XlKEqkkJ9L5fjK0OVetb1kjxUKe82XpLvVj5Xekl+mfIN0kvy/AFhXpGZK2QKcwLjef7zQ2mu8KZm5lq4wlCVC6xvj//wH/7LcoC/780BN/dqpRQlTN9/nel7qjR9n7TO731aaQ6Yu595/C9K4D/8h//wvyiB/0UJIi9K4H9RAv/hP/yH//C/8Yr/jVf8b7ziP/yH//Af/jde8b/xiv+NV/yH//Af/sN/+N94xf/GK/43XvEf/sN/+A//G6/433jF/8Yr/sN/+A//4X/jFf8br/jfeMV/+A//4T/8h/+NV/xvvOJ/4xX/4T/8998W0WO734e+l37YePXyTGm8mn636S8zff6AxXMCf9Z4dXOev9B49fivdyFbWHkD/+WM8F8B"},width:1001,height:576,gutter:{top:2.4,right:4.3,bottom:3.5,left:4.3}},{key:"skin5",label:"Skin 5",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,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"},width:1002,height:578,gutter:{top:2,right:2.3,bottom:2.1,left:2.5}},{key:"skin6",label:"Skin 6",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,UklGRpwBAABXRUJQVlA4TI8BAAAv58OPEE+gkG0E6PzZzmj3aChI24CZf21z1B0FaRsw869tjroz/yGJ7W219d8227S1DSBCNG3Davv/0fUTEf2fAONh/R+A7MiWLKk5ZQFVJmA21oEFVHlQSBrpv/Q6EaGwbdsmSdnd/vEGzakzCaCPXTPPNnvp/nm/+9Kb9bg7M/THy6H32V3Yed87Q+7ANr23ntADc+0jC0Pv3vqhZtkZOPQgdodHNpe+BjxO5HDogwMMy6EbMSznzuLiGcCfcebkkX/umT3tb3/Ol/Uf/Uf/0X/0H/1H/9F/9B/9R//Rf/Qf/Uf/0X/0H/1H/9F/9B/9R//Rf/Qf/Uf/0X/0H/1H/9F/9B/9R//Rf/Qf/Uf/0X/0H/1H/9F/9B/9R//Rf/Qf/Uf/0X/0H/1H/9F/9B/9R//Rf/Qf/Uf/0X80m/xzvuxnJLGnJgkguPQg4xfbeWj2cS8ymztDRCRJRWwc+kgWAVlJnzmKCoj6rNg6NEXlj43XufS1SMjMrp07T/bHYaiaOPSkqoDqai6dxU/FsQsA"},width:1e3,height:576,gutter:{top:1.8,right:2.2,bottom:1.8,left:2.2}},{key:"skin7",label:"Skin 7",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,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"},width:1004,height:581,gutter:{top:1.9,right:2.5,bottom:2.5,left:2.5}},{key:"skin8",label:"Skin 8",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,UklGRtwCAABXRUJQVlA4TM8CAAAv58OPEDegkG0EaP5AB/dyEEjarH+Ch90HQbbN7e4vtM5/wGj/6FOxWUScRpLkSFHVsPy3+NQr9iSi/xMAeDl1R9VdBr2Z9/4C/56CqouITqJ6wVRP5jYAsFtte9q8wAJuA/R7jOQBsoLHSxkhWcETtPvIdgZoDNBS6SBe/YQ3IuAwkqRIytYp3P0F63nhjCHKmukGGeb0nHupqjfuCtlm94rv2TrINo8RqjxbJ9sHmnupGnQ8ZOmce6mq1ynrdvLffu3uWV8LVHqmTraVk3OpULVpnLUaVbAzMnaMf+/uGbOb5wBsw56a5wBsxZ4pN5L/dkF1bcLFwoC55VM/RtnzgJrMPfLM8RY1nONtGUtVv4Yw8DOlPI9yHfmv/LdnV1AuIP+T/8n/hEknyjtTbqTVtRl36jCuZ7QdUO6acseUa8kzQbmgXMh/+RGUC6ZlPMoF5QLyP/NZaMx/Bqn8V/5rOPSTtVlul/LP77NskHwWCDrngnJBuZD/SmhZLk3G50tVNfI/hMb8583Kf+W/AkdQLiD/k//J/+R/8j/5n/xP/if/k//J/+R/8j/5n/xP/teHnkt5C8q1+ddm3KnDuJ78V/7bERSUC8qFkReUC8j/5HM+5R0p941y4+RixvVDxj3GjPvWq+6ActeUO6ZcK3kpLMYdOIy7thh33HsuKBeUC8oF/YJyQbmgXPS2CcpFDvXtPRgn/4P8v6+9I8Z9CRn3IP+V/3YEBeWCcmHkBeUC8j/5n/xP/if/k//J/+R/va8NKv+e41Hz3FWedq+pa6uotVa391CPm0nGnkIkT8t4y2hY5Ds3GkWcN9tzPddNIad34SX11S7eMhpcO0/HuIDT43uK6rluCjm9Cwd0/zxFpVvndbO2cp0PJw9txjNKt8brZjDOdT6cpo45FpTrU+6Rct8oN/6n7Z5xX0LGPTSd2+b9fH0rdNO8n69vfFFJAQA="},width:1e3,height:576,gutter:{top:1.9,right:2.3,bottom:1.9,left:2.3}},{key:"skin9",label:"Skin 9",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,UklGRgQDAABXRUJQVlA4TPgCAAAv58OPEMegoI0kZfxrOW/4jDYUtJGkjH8t5w2fUUEbScr413Le8BnVRLLVvE/OucMBMuhwjxME0ASA/78CGEDABAKgACMiW1VTZkYzG3tvDZz3Hu69OOdg733vvQpYYwzce997r773/ntPApZs204izPE90JeY/1CNQPXfLntH9N+R20aORE+e3RdMvhndl6wOx8u9tBHetHK/HA+rbkZ25zKCnHLeTV66jjjnuptifWoj0Gmn9Vfb2wh1btsv9mXEOmX/dUR82D5GtIf3nevbCHdu61enEe+cXo/XN7613dN1BDzX53xEPI/ZmXHnblUYV1aHEfIcjpQ7Xih3uVPuXihXGuXaiHn0n/77/1jHYfSf/tN/+k//6T/9p//0n/7Tf/pP/+k//af/9J/+03/6T//pP/2n//Sf/tN/+k//6T/9p//0n/7Tf/pP/+k//af/9J/+03/6T//pP/2n//Sf/tN/+k//6T9e5SHGIQMuhZckvOXwlky34d1At/gu0i18iP7Tf/++ymnoY4j9kDLZaurDp/SpUi3F8C0xIa0OYUqGyrMcw7TEjK9J4+SBZTWG6YkVZUOYk55kKcxL4liNM8WKsRTmJmGsn62nWA7zkyGWFpAgNixggFi/gB5icQERYmGJcD7hfDPnf+P8uD3n5+Fhfl4959fJcX7d+4/0fWyW291zfp9ZzO8b/6P9HJhxrNP+0FfKn9PK9XPX45elCvl7VHD+XjT67x9xnH9PF+ffx8f5925i/v26v7/fo/3nov/0n/7Tf/pP/+k//af/9J/+03/6T//pP/2n//Sf/tN/+k//6T/9p//0n/7Tf/pP/+k//af/9J/+03/6T//pP/2n//Sf/tN/+k//6T/9p//0n/7Tf/pP/2EB8+g//afGGuYj5/2QgfO+58B5f4PgvI9JcN6vKDjvSxac9x+Mbse4Peb9hIPzvuHBen8A6TZ89wGRDe39fqTr9mj/pu0x798nmPfpFMz78QrlfbeF+P76gnkfjekA"},width:1e3,height:576,gutter:{top:3.2,right:5.5,bottom:3.3,left:3.6}},{key:"skin10",label:"Skin 10",image:{original:"data:image/png;base64,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",webp:"data:image/webp;base64,UklGRsICAABXRUJQVlA4TLYCAAAv58OPEC/BqLZtJfd99/8LfGyk/QOxGFLAqcE2kq02eG9CaqAHyiZmqISQ3EmKBGwj20p18chqICKkEfqPyOwX4PrYRLbtZL+A3xNM4ADsYQFFlJRIyG1OAQA4+H9IEQA5e3kvhoQLO2nFWFOXiqObIbtCkN0ci9WzO3mRaxnip9BXWc7qZrGJ1g6am40g+09R6/otAAhBGMLLMKII2WL2XVhTQAC8l5Tkjlyq9/+CApIjSYqkYWoaZob//7FnJnu111itV1ZF9J9hG0lxPED+CkIFra+662mRZ2IuFdN11xt6xkzWTZOls8ikXeh8zyoTd94xpsZHyARecPcUJV5yn2rc1IeZyBsuVc6nKjctVC7lmjQZDXoxeYPZ5XpPl1mDcns4pW34nT32UZLGvfa7MDZt7o93Hkzz4+ldmEfRNvmc7sE6nX3OGD1Z55/TPZSiNWp/lwznx3cXw/703Va0+oaB4Wa4Gg6GJFo9QzDcDW44Wel8kfTt849ux78En+n4v71qT0f9nv9gH97tHpr34e0OpxRDJvPwH/4TnJZCw3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Af/sN/+A//4T/8h//wH/7Df/gP/+E//If/8B/+w3/4D//hP/yH//Df/91kHv6Tqlzms1C5NFW56VLlfKhyw5bIL6fuT417uftC4YLXOpW+eaf1OUQ+3aO4H4aOGyVh3/RXq6Hualrket5LP1113T84"},width:1e3,height:576,gutter:{top:3.1,right:3.3,bottom:1.8,left:3.3}}].map((e=>("string"!=typeof e.image.webp&&e.image.webp.src&&(e.image.webp=e.image.webp.src),"string"!=typeof e.image.original&&e.image.original.src&&(e.image.original=e.image.original.src),e))),cv="border_root__NdwIF",dv="border_inner__7WvcE",fv="border_image__5TOWK",hv="border_content__d3D8J",pv={width:"100%",height:"100%"},mv=({gutter:e,borderRadius:t,image:n,className:r,borderContentStyle:i,children:o,shouldRender:a,width:s,height:l})=>a?(0,ae.jsx)("div",{className:lc()(cv,r),children:(0,ae.jsxs)("div",{className:dv,style:{padding:`${e.top}% ${e.right}% ${e.bottom}% ${e.left}%`},children:[(0,ae.jsxs)("picture",{children:[(0,ae.jsx)("source",{srcSet:n.webp,type:"image/webp"}),(0,ae.jsx)("img",{"data-cy":"border-image",className:fv,src:n.original,alt:"Player border skin",width:s,height:l},"3")]}),(0,ae.jsx)("div",{className:lc()(hv),style:{borderRadius:t?`${t}%`:void 0,...i},children:o},"4")]},"2")},"1"):(0,ae.jsx)("div",{style:pv,children:(0,ae.jsxs)("div",{style:pv,children:[(0,ae.jsx)("img",{style:{display:"none"},alt:"Player border skin",width:s,height:l},"3"),(0,ae.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",...pv},children:o},"4")]},"2")},"1"),gv={root:"borderSkin_root__PghQj",withSkin:"borderSkin_withSkin__9oQuK",noSkin:"borderSkin_noSkin__GKdW3",hideCursor:"borderSkin_hideCursor__f6ZTc",iphone:"borderSkin_iphone__yQlcw"},vv=G.ZP.div.withConfig({displayName:"BorderSkinLayout__StyledBorderSkinLayout",componentId:"sc-s1vesq-0"})(["display:inline-flex !important;vertical-align:top;direction:ltr;flex-direction:column;align-items:center;justify-content:center;position:relative;line-height:1;font-family:Roboto,Arial,sans-serif;font-size:16px;color:#fff;max-width:100%;max-height:100%;box-sizing:border-box;user-select:none;*{box-sizing:border-box;}&:-moz-full-screen{position:absolute;}&:-webkit-full-screen{width:100% !important;height:100% !important;}"]),yv=G.ZP.div.withConfig({displayName:"BorderSkinLayout__StyledFadeIn",componentId:"sc-s1vesq-1"})(["opacity:",";transition:opacity 0.3s ease-in-out;width:100%;height:100%;",""],(({$isReady:e})=>e?1:0),(({$isFullScreen:e})=>!e&&(0,G.iv)(["position:relative;z-index:2;"]))),bv=G.ZP.div.withConfig({displayName:"BorderSkinLayout__StyledFadeOut",componentId:"sc-s1vesq-2"})(["aspect-ratio:",";opacity:",";border-radius:",";background:linear-gradient(45deg,#8e96a4 0%,#c9d0de 100%);position:absolute;z-index:1;transition-timing-function:ease-in-out;transition-duration:0.3s;transition-property:opacity,border-radius;height:100%;"],(({$ratio:e})=>e),(({$isReady:e})=>e?0:1),(({$isReady:e,$borderRadius:t})=>t?e?t:"0.625rem":e?"0":"0.625rem")),Ev=G.ZP.div.withConfig({displayName:"BorderSkinLayout__StyledBlackBackground",componentId:"sc-s1vesq-3"})(["background:",";width:100%;height:100%;"],(({$isActive:e})=>e?"#000":"transparent")),Sv=({innerRef:e,videoRatio:t,player:n,children:r,extraContent:o,onMouseDown:a,onTouchStart:s})=>{const{skin:{borderSkinEnabled:l,borderSkin:u}}=n,c=(0,de.I0)(),d=Id("overlay"),h=(0,de.v9)(la.yz),p=(0,de.v9)(la.L2),m=(0,de.v9)(la.$Q),g=(0,de.v9)(la.Gu),v=(0,de.v9)(la.ww),y=lv(u),b=l?y.width/y.height:t,[E,{width:S,height:A},w]=Jg({type:"container",ratio:b}),_=(0,i.useMemo)((()=>{const e=(e,t,n=.1)=>Math.abs(e-t)<=n;return!(e(p,g)&&e(m,v))}),[m,p,v,g]);(0,i.useLayoutEffect)((()=>{c(Gt({width:S,height:A}))}),[c,S,A,l]);const T=lc()(gv.root,gv[u]),O=!h&&l,I=(0,i.useCallback)((e=>{a(),d.onMouseDown?.(e)}),[d,a]),x=(0,i.useCallback)((e=>{s(),d.onTouchStart?.(e)}),[d,s]),C={key:"CONTAINER",ref:_p(E,e),style:{width:p,height:m},...d,onMouseDown:I,onTouchStart:x};return l?(0,ae.jsxs)(vv,{...C,children:[o,(0,ae.jsx)(bv,{$isReady:w,$borderRadius:y.borderRadius,$ratio:b}),(0,ae.jsx)(yv,{$isReady:w,$isFullScreen:h,children:(0,i.createElement)(mv,{...y,className:lc()(gv.withSkin,T),shouldRender:O,key:"inner"},r)})]}):(0,ae.jsxs)(vv,{...C,children:[(0,ae.jsx)(bv,{$isReady:w,$ratio:b}),(0,ae.jsxs)(yv,{$isReady:w,$isFullScreen:h,children:[o,(0,ae.jsx)(Ev,{$isActive:_,children:r})]})]})},Av=(0,i.memo)(Sv),wv=i.lazy((()=>Promise.all([n.e(928),n.e(211)]).then(n.bind(n,6211)).then((({VideoCollection:e})=>({default:e}))))),_v=({playbackSettings:e,extraContent:t,ratio:n,onRegisterVideoAPI:r})=>{const o=(0,de.I0)(),a=(0,i.useRef)(),s=(0,i.useRef)(null),l=(0,de.v9)(bo.m2),u=(0,de.v9)(la.Eb),c=(0,de.v9)(bo.Zh),d=(0,de.v9)(bo.hn),h=(0,de.v9)(bo.it),p=(0,de.v9)(la.FL),m=ud(s),[g,v]=(0,i.useState)(void 0),y=(0,qd.J)(),b=(0,i.useCallback)((e=>{o(hn({item:e}))}),[o]),E=(0,i.useCallback)(((e,t)=>{o(dn({id:e.id,remember:Boolean(t)}))}),[o]),S=(0,i.useMemo)((()=>{const e=u??n??1.777777;if(c)return a.current??e;if(!h)return e;if(h.skin.borderSkinEnabled&&!c){const e=lv(h.skin.borderSkin);return e.width/e.height}return u||!d?e:d.metadata.video.width/d.metadata.video.height}),[h,d,c,u,n]);if(a.current=S,(0,i.useEffect)((()=>{h?.skin.borderSkinEnabled&&n&&console.log("NOTE: Border skin is enabled and fixed ratio is set, this is not supported. Fixed ratio will be ignored.")}),[h?.skin.borderSkinEnabled,n]),!h||!l||!d)return(0,ae.jsx)(sd.T,{ratio:S,children:(0,ae.jsx)(ld.a,{color:h&&h.skin.bgColorEnabled?h.skin.bgColor:void 0})});const A={playerMode:l,file:d,player:h,buttonsScale:1,allControlsAreAlwaysVisible:Boolean(e.allControlsAreAlwaysVisible),videoError:Boolean(g)};return(0,ae.jsx)(Od,{playerMode:l,children:(0,ae.jsx)(mc.Xx,{playerMode:l,loaderRatio:S,player:h,children:(0,ae.jsx)(Av,{innerRef:s,videoRatio:S,player:h,extraContent:t,onMouseDown:m.onMouseDown,onTouchStart:m.onTouchStart,children:(0,ae.jsxs)(Wd,{isNativeFullscreenFallbackEnabled:p,children:[(0,ae.jsxs)(tv,{videoRatio:d.metadata.video.width/d.metadata.video.height,children:[(0,ae.jsx)(sg,{onTimelineItemClick:b,onTimelineItemDismiss:E,onRegisterVideoAPI:r,player:h,file:d,playerMode:l,error:g,onError:v,allControlsAreAlwaysVisible:A.allControlsAreAlwaysVisible}),y?(0,ae.jsx)(i.Suspense,{fallback:null,children:(0,ae.jsx)(wv,{})}):null]}),(0,ae.jsx)(Fh,{...A})]})})})})},Tv=(0,i.memo)(_v),Ov=e=>{const{isRememberDismissEnabled:t}=e,[n,r]=(0,i.useReducer)((e=>e+1),0),o=fe(n),[a,s]=(0,i.useState)((()=>ad(t)));return(0,i.useLayoutEffect)((()=>{void 0!==o&&n!==o&&s(ad(t))}),[n,o,t]),(0,i.useEffect)((()=>()=>a.dispose()),[a]),(0,ae.jsx)(Jm,{value:r,children:(0,ae.jsx)(de.zt,{store:a.store,children:(0,ae.jsx)(Iv,{...e})},n)})},Iv=({ratio:e,playerConfig:t,file:n,playerMode:r,playbackSettings:o,spotlightId:a,currentFunnelNodeId:s,funnelId:l,extraContent:u,onTimeChange:c,onVideoFinished:d,onNavigateToOtherNodeRequest:h,isNativeFullscreenFallbackEnabled:p,playerExternalAPI:m,disableShortcuts:g,disableControls:v})=>{const y=(0,de.I0)(),b=(0,de.v9)(Zo);(0,i.useEffect)((()=>{y(g?Hn():jn())}),[y,g]),(0,i.useEffect)((()=>{y(v?Gn():Vn())}),[y,v]),(0,i.useEffect)((()=>{y(p?qt():Kt())}),[y,p]);const E=(0,i.useMemo)((()=>({playerConfig:t,file:JSON.parse(JSON.stringify(n)),playerMode:r,playbackSettings:o,spotlightId:a,currentFunnelNodeId:s,funnelId:l})),[s,n,l,o,t,r,a]),S=pe(E);(0,i.useEffect)((()=>{We(E,S)||y(xn(E))}),[y,t,S,E]),(0,i.useEffect)((()=>{y(Cn({onTimeChange:c,onVideoFinished:d,onNavigateToOtherNodeRequest:h}))}),[y,h,c,d]);const A=(0,i.useCallback)((()=>{m&&PlayerExternalAPIHolder.instance.register(b,y,m)}),[y,b,m]);return(0,ae.jsx)(Tv,{ratio:e,extraContent:u,playbackSettings:o,onRegisterVideoAPI:A})};var xv=n(6231);const Cv=function(e){return(0,xv.Z)(e,5)};var kv=n(9059);const Rv=function(e,t,n,r){if(!(0,zs.Z)(e))return e;for(var i=-1,o=(t=(0,Js.Z)(t,e)).length,a=o-1,s=e;null!=s&&++i{throw new Error(t??`Didn't expect to get here. Value: ${e}`)},Mv={name:"Voomly Player",general:{autoplay:!1,resumeOnFutureVisitsEnabled:!1,muted:!1,onEnd:{action:"RESET_TO_THUMBNAIL",redirectUrl:void 0}},skin:{bgColor:"#008EFF",bgColorEnabled:!0,logoEnabled:!0,useCustomLogo:!1,customLogoUrl:void 0,customUrl:void 0,controlBarSkin:"default",controlBarPosition:"bottom",borderSkinEnabled:!1,borderSkin:"iphone",subtitles:{fontFamily:"Roboto",fontSize:16,fontStyle:[],textAlign:"align-center",color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)",showByDefault:!1},captions:{playText:"Play",pauseText:"Pause",playbackSpeedText:"Playback speed",volumeText:"Volume",qualityText:"Quality",subtitlesText:"Subtitles",fullscreenText:"Full screen",normalSpeedText:"Normal",rewatchText:"Rewatch",enableSoundText:"Enable sound",logoText:"Logo"}},controls:{playBar:!0,showPlayBar:!0,showEnableSound:!0,visibleControlsOnLoad:!0,showVolumeButton:!0,showSelectSpeedButton:!0,showFullscreenButton:!0,showPlayButton:!0,showSelectQualityButton:!0,showSubtitlesButton:!0,showTime:!0,playButton:"large",customPlayButtonUrl:void 0,showRewatchButton:!0,enableSoundButtonLocation:"top-right"},security:{enabled:!1,password:void 0,title:"Video is Password Protected",enterPasswordText:"Please enter password to view video:",submitButtonText:"Unlock",submitButtonLoadingText:"Loading...",emptyPasswordErrorText:"Password is a required field",wrongPasswordErrorText:"Wrong password"},floatingModal:{enabled:!0,position:"bottom-right",size:"M",hasCloseButton:!0,shouldCloseOnEsc:!0,clickToExpand:{enabled:!0,scale:50},overlayBackground:{enabled:!1,color:"rgba(255, 255, 255, 0.5)",blur:1}},openInModal:{enabled:!0,hasCloseButton:!0,shouldCloseOnEsc:!0,overlayBackground:{enabled:!1,color:"rgba(255, 255, 255, 0.5)",blur:1}},shareVideo:{allowComments:!1,logoInHeader:"voomlyLogo",pageTheme:"systemTheme"}},Fv=()=>({name:"@@SPECIAL_EMPTY_PLAYER@@",general:{...Mv.general,resumeOnFutureVisitsEnabled:!0},security:Mv.security,skin:Mv.skin,controls:Mv.controls,floatingModal:Mv.floatingModal,openInModal:Mv.openInModal,shareVideo:Mv.shareVideo,createdAt:"2020-02-28T16:33:28.760Z",updatedAt:"2020-04-14T23:18:28.612Z",deletedAt:"2020-04-14T23:18:28.612Z"}),Uv=()=>({label:"Turnstile",backgroundColor:"#000",backgroundOpacity:50,buttonText:"Submit",buttonFontSize:14,buttonBackgroundColor:Fv().skin.bgColor,buttonTextColor:"#fff",buttonBorderRadius:4,titleText:"To watch this video, please fill out this form first!",titleFontSize:20,titleFontStyle:[],titleFontColor:"#fff",subTitleText:"We will never share your information with anyone.",subTitleFontSize:16,subTitleFontStyle:[],subTitleFontColor:"#fff",formEmailText:"Email address",formLastNameText:"Last Name",formFirstNameText:"First name",emailRequiredText:"Email address is a required field",emailValidationText:"Enter a valid email address",failedToSubmitText:"Something went wrong, cannot submit the turnstile. Please contact support",skipText:"Skip",isNameRequired:!0,skippable:!0,showFrequency:"untilEmailCollected"}),jv=e=>e?e.filter((e=>Boolean(e))):[],Hv=e=>e?e.filter((e=>Boolean(e))).map((e=>{const t=e;return{actionOnClick:zv(t.actionOnClick),label:t.label??"Button",id:t.id??Math.floor(16777215*Math.random()).toString(16)}})):[],Vv=e=>e&&0!==e.length?e.filter((e=>Boolean(e))):[{type:"doNothing"}],Gv=e=>e&&0!==e.length?e.filter((e=>Boolean(e))):[{type:"doNothing"}],zv=e=>e||{type:"doNothing"},Xv=(e,t)=>{const n=Cv(t),r=Object.keys(n),i=Object.keys(e),o=Yu(i,r),a=Pv(e,o);r.forEach((t=>{void 0!==e[t]&&(n[t]=e[t])}));var s;return{...{...n,...(s=e,{id:s.id,label:s.label??"item",startSecond:s.startSecond??0,endSecond:s.endSecond??1,zIndex:s.zIndex??1})},...a}},Wv=e=>({...Xv(e,{label:"Button",buttonColor:Fv().skin.bgColor,opacity:100,rounded:0,font:"",fontSize:14,fontColor:"#ffffff",fontStyle:["align-center"],verticalAlign:"vertical-align-center",borderSize:0,borderColor:"#ffffff",actionOnClick:{type:"doNothing"},actionsOnEnter:[{type:"doNothing"}],actionsOnPreExit:[{type:"doNothing"}],x:0,y:0,width:100,height:40}),fontStyle:jv(e.fontStyle),actionOnClick:zv(e.actionOnClick),actionsOnEnter:Vv(e.actionsOnEnter),actionsOnPreExit:Gv(e.actionsOnPreExit)}),Qv=e=>({...Xv(e,{label:"Text",font:"",fontSize:14,fontColor:"#000",fontStyle:["align-left"],verticalAlign:"vertical-align-top",borderSize:1,borderColor:"#fff",x:0,y:0,width:100,height:25}),fontStyle:jv(e.fontStyle)}),qv=e=>e||{type:"notSet"},Kv=e=>({...Xv(e,{label:"Image",image:{type:"notSet"},x:0,y:0,width:100,height:100,keepAspectRatio:!0,aspectRatio:1,opacity:100,actionOnClick:{type:"doNothing"},actionsOnEnter:[{type:"doNothing"}],actionsOnPreExit:[{type:"doNothing"}]}),actionOnClick:zv(e.actionOnClick),actionsOnEnter:Vv(e.actionsOnEnter),actionsOnPreExit:Gv(e.actionsOnPreExit),image:qv(e.image)}),Yv=e=>"grid"===e.type||"survey"===e.type||"annotation"===e.type||"imageAnnotation"===e.type||"turnstile"===e.type||"shareGate"===e.type?(0,Dv.Z)(e,["x","y"]):e,Zv=e=>e&&e.length?e.filter((e=>Boolean(e)&&e.type)).map((e=>{const t=Yv(e);switch(t.type){case"grid":return(e=>{const t=Hv(e.buttons);return{...Xv(e,{label:"Grid",backgroundColor:"#000000",backgroundOpacity:85,buttonsInRowCount:2,buttonsCount:6,buttonColor:Fv().skin.bgColor,buttonTextColor:"#FFFFFF",buttonOpacity:100,buttonRounded:0,buttons:[],font:"",fontSize:20,fontStyle:["align-center"],fontColor:"#FFFFFF",appearanceAnimation:"fade",actionsOnEnter:[{type:"pause"}],actionsOnPreExit:[{type:"doNothing"}],isRequired:!1,pauseAutoResumeIn:10,paddingBetweenButtons:5,paddingButtonContainer:5,buttonFontSize:16}),type:"grid",actionsOnEnter:Vv(e.actionsOnEnter),actionsOnPreExit:Gv(e.actionsOnPreExit),buttons:t,buttonsCount:e.buttonsCount??t.length,fontStyle:jv(e.fontStyle)}})(t);case"survey":return(e=>{const t=Hv(e.buttons);return{...Xv(e,{label:"Survey",backgroundColor:"#000000",backgroundOpacity:50,verticalAlign:"vertical-align-center",verticalIndent:0,buttons:[],buttonColor:Fv().skin.bgColor,buttonTextColor:"#FFFFFF",buttonTextIndent:0,buttonVerticalPadding:15,buttonOpacity:70,buttonRounded:100,buttonFontSize:16,buttonBorderColor:"#000000",buttonBorderSize:0,buttonFontHorizontalAlign:["align-center"],paddingBetweenButtons:4,paddingButtonContainer:20,buttonsTitleIndent:0,isTitleEnabled:!0,font:"",fontSize:20,fontStyle:["align-center"],fontColor:"#FFFFFF",titleIndent:0,isMarkersEnabled:!0,markerFont:"",markerFontSize:16,markerFontColor:"#000000",markerType:"letter",markerColor:"#FFFFFF",markerHorizontalPosition:"left",markerIndent:15,appearanceAnimation:"fade",actionsOnEnter:[{type:"pause"}],actionsOnPreExit:[{type:"doNothing"}],isRequired:!1,pauseAutoResumeIn:10}),type:"survey",actionsOnEnter:Vv(e.actionsOnEnter),actionsOnPreExit:Gv(e.actionsOnPreExit),buttons:t,fontStyle:jv(e.fontStyle)}})(t);case"turnstile":return(e=>{const t=(e=>{if(e&&e.name)return e})(e.integrationConfig);return{...Xv(e,Uv()),titleFontStyle:jv(e.titleFontStyle),subTitleFontStyle:jv(e.subTitleFontStyle),...t?{integrationConfig:t}:{},formFirstNameText:e.formFirstNameText||"First name",formLastNameText:e.formLastNameText||"Last name",formEmailText:e.formEmailText||"Email address",emailRequiredText:e.emailRequiredText||"Email address is a required field",emailValidationText:e.emailValidationText||"Enter a valid email address",failedToSubmitText:e.failedToSubmitText||"Something went wrong, cannot submit the turnstile. Please contact support",skipText:e.skipText||"Skip"}})(t);case"shareGate":return(e=>({...Xv(e,{label:"Share Gate",backgroundColor:"#FFFFFF",buttonsBackgroundColor:Fv().skin.bgColor,buttonsTextColor:"#FFFFFF",buttonsBorderRadius:0,titleFontSize:24,titleFontColor:"#000000",titleFontStyle:["bold"],subTitleFontSize:18,subTitleFontColor:"#000000",subTitleFontStyle:[],shareButtonOptions:["facebook","twitter","linkedin"],titleText:"Wait Just a Second",subTitleText:"To continue, click a button below...",doneSharingText:"Done Sharing?",continueText:"Continue",backText:"Back",skipText:"Skip",showFrequency:"once",design:1}),titleFontStyle:jv(e.titleFontStyle),subTitleFontStyle:jv(e.subTitleFontStyle),doneSharingText:e.doneSharingText||"Done Sharing?",continueText:e.continueText||"Continue",backText:e.backText||"Back",skipText:e.skipText||"Skip"}))(t);case"button":return Wv(t);case"text":return Qv(t);case"annotation":return(e=>({...Xv(e,{label:"Annotation",backgroundColor:Fv().skin.bgColor,opacity:100,font:"",fontSize:14,fontStyle:["align-left"],fontColor:"#fff",borderSize:0,borderColor:"#ffffff",rounded:0,actionOnClick:{type:"doNothing"}}),actionOnClick:zv(e.actionOnClick),fontStyle:jv(e.fontStyle)}))(t);case"email":case"hotspot":case"html":return t;case"image":return Kv(t);case"imageAnnotation":return(e=>({...Xv(e,{label:"Image Annotation",image:{type:"notSet"},width:100,height:80,keepAspectRatio:!0,aspectRatio:1.25,opacity:100,actionOnClick:{type:"doNothing"}}),actionOnClick:zv(e.actionOnClick),image:qv(e.image)}))(t);case"quiz":return t;case void 0:throw new Error("impossible")}return Bv(t)})):[],Jv=e=>(e&&void 0!==e.isVisibleOnLoad&&void 0!==e.enabled&&void 0!==e.items||(e={enabled:!1,isVisibleOnLoad:!1,items:[],label:"Chapters"}),e.label||(e={...e,label:"Chapters"}),e),$v=(e,t)=>{if(!e)return Cv(t);const n=Cv(t),r=e,i=Object.keys(n),o=Object.keys(r),a=Yu(o,i),s=Pv(e,a);return i.forEach((e=>{const t=r[e];void 0!==t&&(n[e]=t)})),{...n,...s}},ey=e=>{const t=Fv().general.onEnd;return e&&e.action?e:t},ty=e=>{const t=Fv().skin;return e?{...$v(e,t),captions:{...Mv.skin.captions,...e.captions},customLogoUrl:e.customLogoUrl,customUrl:e.customUrl}:t},ny=e=>{if(e){if("useCustom"in e){if(e.useCustom){if(!e.customUrl)return;return{type:"customImage",url:e.customUrl}}if(!e.frameUrl)return;return{type:"frameFromVideo",frameTime:e.frameTime??0,url:e.frameUrl}}return e}},ry=e=>{const t=Fv().security;return e?{enabled:e.enabled??t.enabled,password:e.password,title:e.title??t.title,enterPasswordText:e.enterPasswordText||"Please enter password to view video:",submitButtonText:e.submitButtonText||"Unlock",submitButtonLoadingText:e.submitButtonLoadingText||"Loading...",emptyPasswordErrorText:e.emptyPasswordErrorText||"Password is a required field",wrongPasswordErrorText:e.wrongPasswordErrorText||"Wrong password"}:t},iy=e=>{const t=Fv().controls;return e?{enableSoundButtonLocation:"top-right",customPlayButtonUrl:e.customPlayButtonUrl,...$v(e,t)}:t},oy=e=>{return{defaultSubtitlesId:e?.defaultSubtitlesId,items:(t=e?.items,t?t.map((e=>(e?.subtitlesId||console.error("Subtitles item without subtitlesId",e),{...e,isAutogenerated:e?.isAutogenerated??!1}))).filter((e=>!!e.subtitlesId)):[])};var t},ay=e=>{const t=Fv().floatingModal;return e?{...$v(e,t)}:t},sy=e=>{const t=Fv().openInModal;return e?{...$v(e,t)}:t},ly=e=>{const t=Fv().shareVideo;return e?{...$v(e,t)}:t},uy=e=>{return{general:(t=e?.general,t?{...$v(t,Fv().general),onEnd:ey(t.onEnd)}:Fv().general),skin:ty(e?.skin),controls:iy(e?.controls),security:ry(e?.security),floatingModal:ay(e?.floatingModal),openInModal:sy(e?.openInModal),shareVideo:ly(e?.shareVideo)};var t},cy=e=>{const t=(e=>e?{name:e.name??"untitled player",createdAt:e.createdAt??"2010-01-01T00:00:00.000Z",updatedAt:e.updatedAt??"2010-01-01T00:00:00.000Z",deletedAt:e.deletedAt??"2010-01-01T00:00:00.000Z",...uy(e)}:Fv())(e);if(!e.videoId)throw new Error("videoId is required");return{...t,videoId:e.videoId,timelineItems:Zv(e.timelineItems),thumbnailItems:(i=e.thumbnailItems,i?i.filter((e=>!!e&&e?.type)).map((e=>{const t=Yv(e);switch(t.type){case"button":return Wv(t);case"text":return Qv(t);case"image":return Kv(t);case void 0:throw new Error("impossible")}return Bv(t)})):[]),thumbnail:ny(e.thumbnail),chapters:Jv(e.chapters),shareVideo:(r=e.shareVideo,{allowComments:!1,logoInHeader:"voomlyLogo",customLogoUrl:void 0,pageTheme:"systemTheme",...r}),subtitles:oy(e.subtitles),attachedPlayerTemplates:(n=e.attachedPlayerTemplates,n?n.filter((e=>{if(!e?.section)return!1;if(!e?.playerTemplateId)return!1;switch(e.section){case"general":case"skin":case"controls":case"security":case"floatingModal":case"openInModal":case"shareVideo":return!0;default:Bv(e.section)}return!0})):[])};var n,r,i};var dy=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function fy(e,t){if(e.length!==t.length)return!1;for(var n=0;n({timelineItems:e,thumbnailItems:t,detachedItemsById:{},detachItemFromStore:py,detachAllItemsFromStore:py,attachSelectedItemsToStore:py,attachItemToStore:py,attachAllItemsToStore:py,updateItem:py,detachSelectedItemsFromStore:py,getAllSelectedItemsValuesByField:()=>[],swapZIndexes:py,selectedItemIds:[],updatePositionInTime:py,handleMultiSelect:py,handleMultiDeselect:py,moveItem:py,itemWrapperHtmlElsRef:i.createRef(),deselectItem:py,handleRectangleSelectIntersection:py,deselectAll:py,snappedToTimeSeconds:void 0,snappedToX:void 0,snappedToY:void 0,isThumbnailEditorActive:!1})))}render(){const{children:e,timelineItems:t,thumbnailItems:n}=this.props;return(0,ae.jsx)(kf.Provider,{value:this.getContextValue(t,n),children:e})}}const my=e=>"vertical-align-top"===e?"flex-start":"vertical-align-center"===e?"center":"vertical-align-bottom"===e?"flex-end":void 0;const gy=function(e){return void 0===e},vy=({buttonsScale:e,borderRadius:t=0,rounded:n,borderColor:r="transparent",borderSize:i=0,buttonColor:o="none",backgroundColor:a,width:s,height:l,padding:u,margin:c,opacity:d,zIndex:h,fontSize:p=14,fontStyle:m=["align-left"],verticalAlign:g="vertical-align-top",color:v="#fff",fontColor:y})=>({style:{borderRadius:n||t?`${Math.round((n||t)*e)}px`:0,borderColor:r,borderWidth:i*e,borderStyle:"solid",backgroundColor:a||o,color:y||v,fill:y||v,width:s?s*e+"px":"auto",height:l?l*e+"px":"auto",padding:gy(u)?5*e+"px":u,margin:gy(c)?0:c,fontSize:p*e+"px",lineHeight:1.1*p*e+"px",fontWeight:m&&m.includes("bold")?"bold":void 0,fontStyle:m&&m.includes("italic")?"italic":void 0,textDecoration:`${m.includes("underline")?"underline":""} ${m.includes("line-through")?"line-through":""}`,justifyContent:Xm(m),alignItems:my(g),textAlign:zm(m),opacity:d?d/100:void 0,zIndex:h}}),yy=e=>e.attrs(vy),by=yy(G.ZP.button)` cursor: pointer; outline: 0 !important; border: 0; box-sizing: border-box; appearance: none; white-space: normal; overflow: hidden; border-style: solid; /* user-select: none !important; */ display: block; // Button shouldn't be anything else then 'block', since it's single element wrapper with other elements > span { display: flex; width: 100%; height: 100%; /* Button can't be display: flex */ /* https://stackoverflow.com/questions/35464067/flex-grid-layouts-not-working-on-button-or-fieldset-elements */ justify-content: ${({fontStyle:e=["align-left"]})=>Xm(e)}; align-items: ${({verticalAlign:e="vertical-align-top"})=>my(e)}; } `,Ey=(e,t)=>{const[n,r]=(0,i.useState)(!1),o=e.backgroundColor||e.buttonColor||"#008eff";return(0,ae.jsx)(by,{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),ref:t,type:"button",verticalAlign:"vertical-align-center",fontStyle:["align-center"],...e,backgroundColor:e.disabled?(0,Cf.ZP)(o).desaturate(70).toHexString():n?(0,Cf.ZP)(o).desaturate(25).toHexString():o,children:(0,ae.jsx)("span",{children:e.children})})},Sy=(0,i.memo)(i.forwardRef(Ey)),Ay=yy(G.ZP.div)` display: inline-flex; box-sizing: border-box; white-space: normal; word-break: break-word; align-items: center; border-style: solid; position: relative; line-height: 1.3; `,wy=(0,i.memo)(i.forwardRef(((e,t)=>(0,ae.jsx)(Ay,{ref:t,...e}))));class BaseItemButton extends i.PureComponent{constructor(...e){super(...e),this.handleOnClick=()=>{const{onClick:e,item:t}=this.props;e&&e(t)}}render(){const{item:e,buttonsScale:t,className:n}=this.props;return(0,ae.jsx)(Sy,{...e,className:n,buttonsScale:t,onClick:this.handleOnClick,children:e.label})}}const _y=G.ZP.div.withConfig({displayName:"appearAnimationHoc__AnimationDiv",componentId:"sc-vs3rtn-0"})(["transition-property:opacity;transition-duration:0.4s;opacity:",";"],(({animationState:e})=>"entering"===e?0:"entered"===e?1:0)),Ty=e=>e=>{class HOC extends i.PureComponent{render(){return(0,ae.jsx)(_y,{animationState:this.props.animationState,children:(0,ae.jsx)(e,{...this.props})})}}return HOC},Oy=G.ZP.div.attrs((e=>({style:{left:e.x*e.buttonsScale+"px",top:e.y*e.buttonsScale+"px"}}))).withConfig({displayName:"positionHoc__DraggableDiv",componentId:"sc-du55rh-0"})(["position:absolute;z-index:",";",""],(e=>e.zIndex),(({isInteractable:e})=>!e&&(0,G.iv)(["pointer-events:none;"]))),Iy=e=>t=>{class HOC extends i.PureComponent{constructor(...e){super(...e),this.ref=(0,i.createRef)()}render(){const{item:n,buttonsScale:r}=this.props;return(0,ae.jsx)(Oy,{x:n.x,y:n.y,buttonsScale:r,zIndex:n.zIndex,ref:this.ref,isInteractable:e.isInteractable,children:(0,ae.jsx)(t,{...this.props})})}}return HOC},xy=(0,G.F4)(["0%{opacity:1;transform:scale(1);animation-timing-function:ease-in-out;}100%{opacity:0;transform:scale(0.7);animation-timing-function:ease-in-out;}"]),Cy=G.ZP.div.withConfig({displayName:"highlightItemHoc__AnimationDiv",componentId:"sc-bkgrqq-0"})(["animation-name:",";animation-duration:","s;animation-iteration-count:",";animation-fill-mode:forwards;pointer-events:",";"],(({isHighlighted:e,isHidden:t})=>e?"none":t?xy:"none"),(({isHighlighted:e,disableHideAnimation:t})=>t?0:e?1:.5),(({isHighlighted:e})=>e?"infinite":1),(({isHidden:e,isHighlighted:t})=>e||t?"none":"auto")),ky=e=>e=>t=>{const{item:n}=t,r=(0,de.v9)((e=>e.videoItemsOnScreen.highlightedItemId)),i=(0,de.v9)((e=>!!e.sourceConfiguration?.current?.funnelId));let o=!1,a=!1;return void 0!==r&&(o=r===n.id,a=!o),(0,ae.jsx)(Cy,{isHighlighted:o,isHidden:a,disableHideAnimation:i,children:(0,ae.jsx)(e,{...t})})},Ry=Ty()(Iy({isInteractable:!0})(ky()((({onClick:e,...t})=>(0,ae.jsx)(BaseItemButton,{...t,onClick:()=>e(t.item)}))))),Ly=e=>{const t=(0,i.useMemo)((()=>Object.fromEntries(Object.entries({display:e.container?"flex":"block",justifyContent:e.justifyContent,flexDirection:e.flexDirection,flexGrow:e.flexGrow,flexBasis:e.flexBasis,flexShrink:e.flexShrink,flexWrap:e.flexWrap,flex:e.flex,alignItems:e.alignItems,margin:e.margin,padding:e.padding,width:e.width,height:e.height,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,minHeight:e.minHeight,...e.style}).filter(((e,t)=>void 0!==t)))),[e.alignItems,e.container,e.flex,e.flexBasis,e.flexDirection,e.flexGrow,e.flexShrink,e.flexWrap,e.height,e.justifyContent,e.margin,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.padding,e.style,e.width]);return(0,ae.jsx)("div",{className:e.className,style:t,onClick:e.onClick,children:e.children})},Ny=(0,i.memo)(Ly);var Py;function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Dy({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:100,height:100,viewBox:"0 0 30 30",ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,Py||(Py=i.createElement("path",{d:"M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"})))},My=(0,i.forwardRef)(By);n.p;var Fy;function Uy(){return Uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Uy({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",width:96,height:96,xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,Fy||(Fy=i.createElement("path",{d:"M72 0H59.7c-14 0-23 9.3-23 23.7v10.9H24c-1 0-2 .8-2 2v15.7c0 1.1 1 2 2 2h12.6v39.9c0 1 .8 2 2 2h16.3c1 0 2-1 2-2v-40h14.6c1 0 2-.8 2-1.9V36.5a2 2 0 0 0-2-2H56.8v-9.2c0-4.4 1.1-6.7 6.9-6.7H72c1 0 2-.9 2-2V2c0-1.1-1-2-2-2z"})))},Hy=(0,i.forwardRef)(jy);n.p;var Vy;function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Gy({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 430 430",width:430,height:430,xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,Vy||(Vy=i.createElement("path",{d:"M430 262v159h-92V272c0-37-13-63-47-63-25 0-40 18-47 34-3 6-3 14-3 23v155h-92V143h92v40h-1 1c12-19 34-46 83-46 61 0 106 39 106 125zM52 10C21 10 0 30 0 57s20 48 51 48h1c32 0 52-21 52-48-1-27-20-47-52-47zM5 421h93V143H5v278z"})))},Xy=(0,i.forwardRef)(zy);n.p;var Wy,Qy;function qy(){return qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",qy({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 85 58",width:85,height:58,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,Wy||(Wy=i.createElement("path",{d:"M15.5 32 2 43.5l11 13",stroke:"#728898",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),Qy||(Qy=i.createElement("path",{d:"M78 2C88.7 23.8 89 62.7 5 43.5",stroke:"#728898",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"8 10"})))},Yy=(0,i.forwardRef)(Ky),Zy=(n.p,"share_share__vTZo8"),Jy="share_group__cMRns",$y=(0,G.ZP)(wy).withConfig({displayName:"BaseShareGate__Title",componentId:"sc-1dqep5s-0"})(["display:flex;letter-spacing:-1px;"]),eb=(0,G.ZP)(Sy).withConfig({displayName:"BaseShareGate__StyledButton",componentId:"sc-1dqep5s-1"})(["svg{width:75%;height:auto;max-height:75%;}"]),tb=(0,G.ZP)((({buttonsScale:e,...t})=>(0,ae.jsx)(Yy,{...t}))).withConfig({displayName:"BaseShareGate__StyledArrow",componentId:"sc-1dqep5s-2"})(["position:absolute;height:auto;width:",";bottom:",";right:",";"],(({buttonsScale:e})=>60*e+"px"),(({buttonsScale:e})=>30*e+"px"),(({buttonsScale:e})=>30*e+"px")),nb={facebook:{icon:(0,ae.jsx)(Hy,{}),text:"Facebook",getUrl:e=>`https://www.facebook.com/sharer/sharer.php?u=${e}`},twitter:{icon:(0,ae.jsx)(My,{}),text:"Twitter",getUrl:e=>`https://twitter.com/share?url=${e}`},linkedin:{icon:(0,ae.jsx)(Xy,{}),text:"LinkedIn",getUrl:e=>`https://linkedin.com/shareArticle?mini=true&url=${e}`}},rb=({id:e,onClick:t,borderRadius:n,backgroundColor:r,color:o,buttonsScale:a})=>{const s=nb[e],l=(0,i.useCallback)((()=>t(nb[e])),[t,e]);return(0,ae.jsx)(eb,{borderRadius:n,backgroundColor:r,color:o,buttonsScale:a,margin:`0 ${5*a}px`,width:32,height:32,onClick:l,children:s.icon})},ib=({item:e,buttonsScale:t,onShareButtonClick:n,doneSharingScreen:r,onBackFromSharingClick:i,onContinueAfterSharingClick:o,titleText:a,subTitleText:s,onWrapperMouseDown:l})=>(0,ae.jsx)("div",{className:Zy,onMouseDown:l,children:r?(0,ae.jsxs)("div",{className:Jy,style:{backgroundColor:e.backgroundColor,padding:20*t},children:[(0,ae.jsx)(wy,{buttonsScale:t,color:e.titleFontColor,padding:"0",fontSize:30,margin:`0 0 ${20*t}px`,fontStyle:["bold"],children:e.doneSharingText}),(0,ae.jsxs)(Ny,{container:!0,children:[(0,ae.jsx)(eb,{buttonsScale:t,borderRadius:e.buttonsBorderRadius,backgroundColor:e.buttonsBackgroundColor,color:e.buttonsTextColor,width:100,height:25,margin:`0 ${5*t}px`,onClick:i,children:e.backText}),(0,ae.jsx)(eb,{buttonsScale:t,borderRadius:e.buttonsBorderRadius,backgroundColor:e.buttonsBackgroundColor,color:e.buttonsTextColor,width:100,height:25,margin:`0 ${5*t}px`,onClick:o,children:e.continueText})]})]}):(0,ae.jsxs)("div",{className:Jy,style:{backgroundColor:e.backgroundColor,padding:20*t},children:[(0,ae.jsx)(tb,{buttonsScale:t}),(0,ae.jsxs)(Ny,{margin:`0 0 ${15*t}px`,width:"100%",children:[(0,ae.jsx)($y,{buttonsScale:t,fontSize:e.titleFontSize,fontStyle:e.titleFontStyle,color:e.titleFontColor,padding:"0",margin:`0 0 ${5*t}px`,children:a}),(0,ae.jsx)($y,{buttonsScale:t,fontSize:e.subTitleFontSize,fontStyle:e.subTitleFontStyle,color:e.subTitleFontColor,padding:"0",children:s})]}),(0,ae.jsxs)(Ny,{container:!0,alignItems:"center",justifyContent:"center",padding:`${8*t}px ${12*t}px`,children:[e.shareButtonOptions.indexOf("facebook")>-1&&(0,ae.jsx)(rb,{id:"facebook",onClick:n,borderRadius:e.buttonsBorderRadius,backgroundColor:e.buttonsBackgroundColor,color:e.buttonsTextColor,buttonsScale:t}),e.shareButtonOptions.indexOf("twitter")>-1&&(0,ae.jsx)(rb,{id:"twitter",onClick:n,borderRadius:e.buttonsBorderRadius,backgroundColor:e.buttonsBackgroundColor,color:e.buttonsTextColor,buttonsScale:t}),e.shareButtonOptions.indexOf("linkedin")>-1&&(0,ae.jsx)(rb,{id:"linkedin",onClick:n,borderRadius:e.buttonsBorderRadius,backgroundColor:e.buttonsBackgroundColor,color:e.buttonsTextColor,buttonsScale:t})]})]})});const ob=(e,t={},n)=>{const{name:r,height:i=400,width:o=550}=t,a={height:i,width:o,left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-o/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-i/2,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},s=window.open(e,function(e){const t=/MSIE ([0-9]+)/g.exec(window.navigator.userAgent),n=t?(t[1],10):NaN;return!!t&&n`${e}=${t}`)).join(", "));if(n){const e=window.setInterval((()=>{try{(null===s||s.closed)&&(window.clearInterval(e),n(s))}catch(t){}}),300)}return s};class PlayerShareGateItem extends i.PureComponent{constructor(...e){super(...e),this.state={clickedOnShareButton:!1},this.switchToContinueButtonTimeout=void 0,this.handleContinueAfterShareClick=()=>{re.A7.setItem(Do(this.props.item),(new Date).toDateString()),this.props.onDismiss(this.props.item)},this.handleBackFromSharingClick=()=>this.setState({clickedOnShareButton:!1}),this.handleShareButtonClick=e=>{ob(e.getUrl(encodeURIComponent(window.location.href.replace("app.voomly.com","share.voomly.com"))),void 0,(()=>({}))),this.switchToContinueButtonTimeout=window.setTimeout((()=>{this.setState({clickedOnShareButton:!0})}),5e3)}}componentWillUnmount(){this.switchToContinueButtonTimeout&&window.clearTimeout(this.switchToContinueButtonTimeout)}render(){const{clickedOnShareButton:e}=this.state,{item:t}=this.props;return(0,ae.jsx)(ib,{doneSharingScreen:e,onBackFromSharingClick:this.handleBackFromSharingClick,onShareButtonClick:this.handleShareButtonClick,onContinueAfterSharingClick:this.handleContinueAfterShareClick,titleText:t.titleText,subTitleText:t.subTitleText,...this.props})}}var ab;function sb(){return sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",sb({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",width:10,height:10,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,ab||(ab=i.createElement("path",{d:"M1.5 0 0 1.5 3.5 5 0 8.5 1.5 10 5 6.5 8.5 10 10 8.5 6.5 5 10 1.5 8.5 0 5 3.5 1.5 0Z",fill:"currentColor"})))},ub=(0,i.forwardRef)(lb),cb=(n.p,e=>`0 0 ${15*e}px 0`),db=(0,G.ZP)(ub).withConfig({displayName:"BaseAnnotation__StyledCrossIcon",componentId:"sc-h7drn2-0"})(["color:#fff;"]),fb=G.ZP.button.withConfig({displayName:"BaseAnnotation__StyledDismissButton",componentId:"sc-h7drn2-1"})(["cursor:pointer;border-radius:50%;position:absolute;top:0;right:0;transform:translate(50%,-50%);width:18px;min-width:18px;height:18px;padding:0;color:#728898;background:",";outline:0 !important;border:0 !important;z-index:",";svg{position:absolute;max-width:100%;max-height:100%;top:50%;left:50%;transform:translate(-50%,-50%);}&:hover,&:focus{background:",";color:#728898;}"],(({background:e})=>e||"#000"),(({zIndex:e})=>e||10),(({background:e})=>e||"#000")),hb=(0,G.ZP)(i.forwardRef(((e,t)=>(0,ae.jsx)(wy,{width:200,margin:cb(e.buttonsScale),...e,ref:t})))).withConfig({displayName:"BaseAnnotation__AnnotationWrapper",componentId:"sc-h7drn2-2"})([""]);class BaseAnnotationItem extends i.PureComponent{constructor(...e){super(...e),this.handleDismiss=()=>{const{onDismiss:e,item:t}=this.props;e&&e(t)},this.handleOnClick=()=>{const{onClick:e,item:t}=this.props;e&&e(t)}}render(){const{item:e,buttonsScale:t,className:n}=this.props;return(0,ae.jsxs)("div",{children:[(0,ae.jsx)(hb,{...e,buttonsScale:t,onClick:this.handleOnClick,className:n,children:e.label}),(0,ae.jsx)(fb,{type:"button",background:e.backgroundColor,zIndex:e.zIndex,onClick:this.handleDismiss,children:(0,ae.jsx)(db,{})})]})}}const pb=G.ZP.div.withConfig({displayName:"appearAnimationHoc__AnimationDiv",componentId:"sc-1jnuhoh-0"})(["transition-property:opacity,transform;transition-duration:0.2s;opacity:",";transform:",";z-index:100;"],(({animationState:e})=>"entering"===e?0:"entered"===e?1:"exiting"===e||"exited"===e?0:1),(({animationState:e})=>"entering"===e?"translateX(-100%)":"entered"===e?"translateX(0)":"exiting"===e||"exited"===e?"translateX(-100%)":0)),mb=e=>e=>{class HOC extends i.PureComponent{render(){return(0,ae.jsx)(pb,{animationState:this.props.animationState,children:(0,ae.jsx)(e,{...this.props})})}}return HOC},gb=(0,G.ZP)(BaseAnnotationItem).withConfig({displayName:"PlayerAnnotation__AnnotationStyled",componentId:"sc-fxhz61-0"})(["cursor:",";"],(({isClickable:e})=>e?"pointer":"default")),vb=mb()(ky()((e=>(0,ae.jsx)(gb,{isClickable:"doNothing"!==e.item.actionOnClick.type,...e}))));var yb,bb=n(6709);function Eb(){return Eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Eb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 10",width:16,height:10,ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,yb||(yb=i.createElement("path",{fill:"currentColor",d:"M11.2 9.2 15.4 5 11.2.8l-.8.9L13 4.4H.5v1.2H13l-2.6 2.7.8.9Z"})))},Ab=(0,i.forwardRef)(Sb),wb=(n.p,(0,G.ZP)((({backgroundColor:e,backgroundOpacity:t,...n})=>(0,ae.jsx)("div",{...n}))).withConfig({displayName:"BaseTurnstile__StyledBackgroundDiv",componentId:"sc-bqcbl2-0"})(["position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;background-color:",";opacity:",";"],(({backgroundColor:e})=>e),(({backgroundOpacity:e})=>e/100))),_b=G.ZP.div.withConfig({displayName:"BaseTurnstile__StyledTurnstileWrapper",componentId:"sc-bqcbl2-1"})(["display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;"]),Tb=G.ZP.div.withConfig({displayName:"BaseTurnstile__StyledPreviewBadge",componentId:"sc-bqcbl2-2"})(["position:absolute;bottom:8px;left:8px;font-size:9px;color:#fff;opacity:0.7;text-transform:uppercase;"]),Ob=G.ZP.div.withConfig({displayName:"BaseTurnstile__StyledFormWrapper",componentId:"sc-bqcbl2-3"})(["position:relative;max-width:100%;width:",";color:#fff;text-align:left;form{width:100%;height:100%;}label{display:block;margin:0;margin-bottom:",";font-size:",";}input{width:100%;}"],(({buttonsScale:e})=>400*e+"px"),(({buttonsScale:e})=>5*e+"px"),(({buttonsScale:e})=>14*e+"px")),Ib=(0,G.ZP)((({buttonsScale:e,...t})=>(0,ae.jsx)("div",{...t}))).attrs((({buttonsScale:e})=>({style:{display:"flex",justifyContent:"space-between",margin:0,marginBottom:15*e}}))).withConfig({displayName:"BaseTurnstile__StyledInputsRow",componentId:"sc-bqcbl2-4"})(["> div{width:",";}"],(({buttonsScale:e})=>`calc(50% - ${10*e}px)`)),xb=G.ZP.input.attrs((({buttonsScale:e})=>({style:{background:"rgba(255, 255, 255, 0.2)",border:"1px solid #ffffff",height:30*e,fontSize:14*e,padding:10*e,color:"#fff"}}))).withConfig({displayName:"BaseTurnstile__StyledInput",componentId:"sc-bqcbl2-5"})([""]),Cb=G.ZP.div.attrs((({buttonsScale:e})=>({style:{marginTop:6*e,fontSize:12*e,color:"#ff7171"}}))).withConfig({displayName:"BaseTurnstile__StyledError",componentId:"sc-bqcbl2-6"})([""]),kb=(0,G.ZP)((({buttonsScale:e,skipText:t,...n})=>(0,ae.jsxs)("button",{type:"button",...n,children:[t," ",(0,ae.jsx)(Ab,{})]}))).attrs((({buttonsScale:e})=>({style:{marginTop:6*e,fontSize:11*e,bottom:8*e,right:8*e,padding:`${10*e}px ${20*e}px`}}))).withConfig({displayName:"BaseTurnstile__StyledSkipButton",componentId:"sc-bqcbl2-7"})(["&&{position:absolute;z-index:2;text-transform:uppercase;font-weight:500;letter-spacing:0.5px;line-height:1;color:#fff;border:0;background:none;cursor:pointer;display:flex;align-items:center;&:hover{color:#fff;background:rgba(255,255,255,0.2);}svg{margin-left:8px;}}"]),Rb=G.ZP.div.withConfig({displayName:"BaseTurnstile__StyledActions",componentId:"sc-bqcbl2-8"})(["display:flex;justify-content:center;"]),Lb=/^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$/,Nb=({item:e,buttonsScale:t,isPreviewMode:n,titleText:r,subTitleText:o,formFirstNameText:a,formLastNameText:s,formEmailText:l,onWrapperMouseDown:u,onSkip:c,onSubmit:d})=>{const{isNameRequired:h,skippable:p}=e,m=(0,i.useCallback)((()=>{c()}),[c]),{handleSubmit:g,isSubmitting:v,values:y,setValue:b,errors:E,setError:S}=(0,bb.g)({email:"",firstName:"",lastName:""},(async({values:e})=>{let t=!1;e.email?Lb.test(e.email)||(S("email","Email address is invalid"),t=!0):(S("email","Email address is required"),t=!0),h&&(e.firstName||(S("firstName","First name is required"),t=!0),e.lastName||(S("lastName","Last name is required"),t=!0)),t||await d(e)})),A=(0,i.useCallback)((e=>{const t=e.target.value;Lb.test(t)&&S("email",null),b("email",t)}),[S,b]);return(0,ae.jsxs)(_b,{onMouseDown:u,children:[(0,ae.jsx)(wb,{backgroundColor:e.backgroundColor,backgroundOpacity:e.backgroundOpacity}),n&&(0,ae.jsx)(Tb,{children:"Preview mode"}),p&&(0,ae.jsx)(kb,{skipText:e.skipText,onClick:m,buttonsScale:t}),(0,ae.jsx)(Ob,{buttonsScale:t,children:(0,ae.jsxs)("div",{children:[(0,ae.jsx)(wy,{buttonsScale:t,fontSize:e.titleFontSize,fontStyle:["align-center",...e.titleFontStyle],color:e.titleFontColor,margin:`0 0 ${10*t}px`,padding:"0",children:r}),(0,ae.jsx)(wy,{buttonsScale:t,fontSize:e.subTitleFontSize,fontStyle:["align-center",...e.subTitleFontStyle],color:e.subTitleFontColor,margin:`0 0 ${20*t}px`,padding:"0",children:o}),h&&(0,ae.jsxs)(Ib,{buttonsScale:t,children:[(0,ae.jsxs)("div",{children:[(0,ae.jsx)("label",{children:a}),(0,ae.jsx)(xb,{type:"text",name:"firstName",buttonsScale:t,value:y.firstName,onChange:e=>b("firstName",e.target.value)}),E.firstName&&(0,ae.jsx)(Cb,{buttonsScale:t,children:E.firstName})]}),(0,ae.jsxs)("div",{children:[(0,ae.jsx)("label",{children:s}),(0,ae.jsx)(xb,{type:"text",name:"lastName",value:y.lastName,buttonsScale:t,onChange:e=>b("lastName",e.target.value)}),E.lastName&&(0,ae.jsx)(Cb,{buttonsScale:t,children:E.lastName})]})]}),(0,ae.jsxs)("div",{children:[(0,ae.jsx)("label",{children:l}),(0,ae.jsx)(xb,{type:"email",name:"email",value:y.email,buttonsScale:t,onChange:A}),E.email&&(0,ae.jsx)(Cb,{buttonsScale:t,children:E.email})]}),(0,ae.jsx)(Rb,{children:(0,ae.jsx)(Sy,{type:"button",onClick:g,disabled:v,fontSize:e.buttonFontSize,backgroundColor:e.buttonBackgroundColor,color:e.buttonTextColor,borderRadius:e.buttonBorderRadius,buttonsScale:t,padding:`${10*t}px ${24*t}px`,margin:20*t+"px 0 0",children:e.buttonText})})]})})]})},Pb=e=>fetch((0,Ol.b)("/subscribe"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({itemId:e.turnstileItemId,...e.body,..."videoId"in e?{videoId:e.videoId}:{},..."funnelId"in e?{funnelId:e.funnelId}:{}})}),Db=(0,Vf.generate)(),Bb=e=>{const t=Zl();return fetch((0,Ol.b)("/turnstile-submissions"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e.body?e.body:{},visitorId:Db,timelineItemId:e.turnstileItemId,os:t.charAt(0).toLowerCase()+t.slice(1),device:Yl().toLowerCase(),browser:Kl(),...e.funnelNodeId?{funnelNodeId:e.funnelNodeId}:{},...e.videoId?{videoId:e.videoId}:{},...e.funnelId?{funnelId:e.funnelId}:{}})})},Mb=e=>e.customIntegrations.turnstile,Fb=i.createContext(void 0);const Ub=n.p+"upload-image.568c5c1dcff87620e859dc5889e9a2eb.svg";var jb;function Hb(){return Hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Hb({width:"23px",height:"18px",viewBox:"0 0 23 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,jb||(jb=i.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},i.createElement("polygon",{id:"Path",fill:"currentColor",fillRule:"nonzero",points:"21.234 0 7.128 14.395 1.766 8.923 0 10.725 7.128 18 23 1.802"}))))},Gb=(0,i.forwardRef)(Vb);n.p;var zb;function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",Xb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,zb||(zb=i.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Qb=(0,i.forwardRef)(Wb),qb=(n.p,({small:e,large:t})=>e?"24px":t?"56px":"40px"),Kb=(0,G.F4)(["50%{color:transparent;}"]),Yb=(0,G.F4)(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),Zb=G.ZP.div.withConfig({displayName:"CircularProgress__StyledAnimatedDiv",componentId:"sc-zadgnr-0"})([""," width:100%;height:100%;"],(({animated:e})=>e&&(0,G.iv)(["animation:"," 0.6s linear infinite;"],Yb))),Jb=G.ZP.span.withConfig({displayName:"CircularProgress__StyledValue",componentId:"sc-zadgnr-1"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);line-height:1;font-size:",";color:",";font-weight:500;",""],(({small:e,large:t})=>e?"7px":t?"14px":"10px"),(({white:e})=>e?"#fff":"inherit"),(({done:e,failed:t})=>(e||t)&&"\n opacity: 0;\n visibility: hidden;\n ")),$b=G.ZP.span.withConfig({displayName:"CircularProgress__StyledOk",componentId:"sc-zadgnr-2"})(["position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;transition:opacity 0.1s ease-in;opacity:",";"," ",""],(({done:e})=>e?1:0),(({small:e})=>e&&"\n svg {\n width: 12px;\n height: 12px;\n }\n "),(({large:e})=>e&&"\n svg {\n width: 30px;\n height: 30px;\n }\n ")),eE=G.ZP.span.withConfig({displayName:"CircularProgress__StyledErrorIcon",componentId:"sc-zadgnr-3"})(["position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;transition:opacity 0.1s ease-in;opacity:",";svg{width:",";height:",";}"],(({failed:e})=>e?1:0),(({small:e})=>e?"12px":"16px"),(({small:e})=>e?"12px":"16px")),tE=G.ZP.path.withConfig({displayName:"CircularProgress__StyledPathTrack",componentId:"sc-zadgnr-4"})(["stroke:var(--gray-100);fill-opacity:0;"]),nE=G.ZP.path.withConfig({displayName:"CircularProgress__StyledPathHead",componentId:"sc-zadgnr-5"})(["transform-origin:center;transition:stroke-dashoffset 0.2s cubic-bezier(0.4,1,0.75,0.9);stroke:currentColor;stroke-linecap:round;fill-opacity:0;color:",";"],(({white:e})=>e&&"#1a99ff")),rE=G.ZP.svg.withConfig({displayName:"CircularProgress__StyledSVG",componentId:"sc-zadgnr-6"})(["display:block;width:",";height:",";"],qb,qb),iE=G.ZP.span.withConfig({displayName:"CircularProgress__StyledRoot",componentId:"sc-zadgnr-7"})(["display:block;position:relative;color:",";width:",";height:",";"],(({white:e,done:t,failed:n})=>e?"#fff":t?"#94D07C":n?"#F44336":"var(--primary-color, var(--azure-500))"),qb,qb),oE=G.ZP.span.withConfig({displayName:"CircularProgress__Dot",componentId:"sc-zadgnr-8"})(["display:inline-block;animation:1s "," infinite;font-size:",";font-weight:bold;line-height:0;&:nth-child(1){animation-delay:0ms;}&:nth-child(2){animation-delay:250ms;}&:nth-child(3){animation-delay:500ms;}"],Kb,(({small:e})=>e?"12px":"20px")),aE=({state:e,small:t,large:n,white:r})=>{let i=null;switch(e.type){case"inProgress":i=`${Math.floor(100*e.value)}%`;break;case"inTimeProgress":i=(0,of.q)(e.time);break;case"processing":i=void 0===e.value?(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(oE,{small:t,children:"."}),(0,ae.jsx)(oE,{small:t,children:"."}),(0,ae.jsx)(oE,{small:t,children:"."})]}):`${Math.floor(100*e.value)}%`;break;case"inQueue":i="Q";break;default:i=null}return(0,ae.jsx)(Jb,{failed:"failed"===e.type,done:"done"===e.type,white:r,large:n,small:t,children:i})},sE=({className:e,state:t,small:n,large:r,white:o,withoutDots:a,withoutCircle:s})=>{const l=(0,i.useMemo)((()=>"inProgress"===t.type||"inTimeProgress"===t.type?280*(1-(t.value||0)):"processing"===t.type?210:0),[t]);return(0,ae.jsxs)(iE,{className:e,white:!!o,large:!!r,small:!!n,failed:"failed"===t.type,done:"done"===t.type,children:[!s&&(0,ae.jsx)(Zb,{animated:"processing"===t.type,children:(0,ae.jsxs)(rE,{width:"40",height:"40",strokeWidth:6,viewBox:"1.00 1.00 98.00 98.00",className:e,large:!!r,small:!!n,children:[(0,ae.jsx)(tE,{d:"M 50,50 m 0,-45 a 45,45 0 1 1 0,90 a 45,45 0 1 1 0,-90"}),(0,ae.jsx)(nE,{d:"M 50,50 m 0,-45 a 45,45 0 1 1 0,90 a 45,45 0 1 1 0,-90",pathLength:"280",strokeDasharray:"280 280",strokeDashoffset:l,white:!!o})]})}),!a&&(0,ae.jsx)(aE,{state:t,small:!!n,large:!!r,white:!!o}),(0,ae.jsx)($b,{large:!!r,small:!!n,done:"done"===t.type,children:(0,ae.jsx)(Gb,{})}),(0,ae.jsx)(eE,{small:!!n,failed:"failed"===t.type,children:(0,ae.jsx)(Qb,{})})]})},lE=(0,i.memo)(sE),uE=(0,G.ZP)(lE).withConfig({displayName:"CircularProgress__CircularProgressCentered",componentId:"sc-zadgnr-9"})(["position:absolute !important;top:50%;left:50%;z-index:2;transform:translate(-50%,-50%);width:40px;height:40px;"]),cE=G.ZP.div.withConfig({displayName:"Dim",componentId:"sc-56x91i-0"})(["content:'';position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-color:rgba(0,0,0,0.2);"]);const dE=n.p+"no-image.07dca3e8d9958568199aa49909cdb8c5.svg",fE=({onError:e,...t},n)=>{const[r,o]=(0,i.useState)(!1),a=(0,i.useCallback)((t=>{r||(o(!0),e&&e(t))}),[r,o,e]);return(0,i.useEffect)((()=>{o(!1)}),[t.src]),(0,ae.jsx)("img",{"data-cy":"imageWithFallback-img",alt:"",...t,src:r?dE:t.src,onError:a,ref:n})},hE=i.forwardRef(fE),pE=(0,G.ZP)(hE).withConfig({displayName:"UploadableImageContent__ImgStyled",componentId:"sc-1r1lgur-0"})(["width:100%;height:100%;overflow:hidden;border:none;user-drag:none;"]);function mE({item:e,onClick:t,uploadProgress:n,className:r,style:i}){return(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(pE,{className:r,src:"notSet"===e.image.type?Ub:e.image.src,onClick:()=>t&&t(e),onMouseDown:e=>{e.preventDefault&&e.preventDefault()},alt:"",style:i}),void 0!==n&&(0,ae.jsx)(cE,{}),void 0!==n&&(0,ae.jsx)(uE,{state:{type:"inProgress",value:n}})]})}const gE=G.ZP.div.attrs((({item:e,buttonsScale:t})=>({style:{width:e.width*t,height:e.height*t,zIndex:e.zIndex}}))).withConfig({displayName:"Base__Wrapper",componentId:"sc-11m5ykb-0"})(["overflow:hidden;border:none;position:relative;"]),vE=i.forwardRef((({item:e,buttonsScale:t,onClick:n,className:r,uploadProgress:i},o)=>(0,ae.jsx)(gE,{item:e,buttonsScale:t,ref:o,className:r,children:(0,ae.jsx)(mE,{item:e,onClick:n,uploadProgress:i,style:{opacity:(e.opacity??100)/100}})}))),yE=(0,G.ZP)(vE).withConfig({displayName:"PlayerImage__ImageItemStyled",componentId:"sc-1vtijnr-0"})(["cursor:",";"],(({isClickable:e})=>e?"pointer":"default")),bE=Ty()(Iy({isInteractable:!0})(ky()((e=>(0,ae.jsx)(yE,{isClickable:"doNothing"!==e.item.actionOnClick.type,...e}))))),EE=G.ZP.div.attrs((({item:e,buttonsScale:t})=>({style:{zIndex:e.zIndex,width:e.width*t,height:e.height*t,margin:cb(t)}}))).withConfig({displayName:"Base__Wrapper",componentId:"sc-1p6ezlj-0"})(["border:none;position:relative;"]),SE=(0,G.ZP)(ub).withConfig({displayName:"Base__StyledCrossIcon",componentId:"sc-1p6ezlj-1"})(["color:#fff;"]),AE=i.forwardRef((({item:e,buttonsScale:t,onClick:n,onDismiss:r,className:i,uploadProgress:o},a)=>(0,ae.jsxs)(EE,{item:e,buttonsScale:t,ref:a,className:i,children:[(0,ae.jsx)(mE,{item:e,onClick:n,uploadProgress:o,style:{opacity:(e.opacity??100)/100}}),r&&(0,ae.jsx)(fb,{zIndex:e.zIndex,onClick:()=>r(e),children:(0,ae.jsx)(SE,{})})]}))),wE=(0,G.ZP)(AE).withConfig({displayName:"PlayerImageAnnotation__ImageAnnotationItemStyled",componentId:"sc-nr35r-0"})(["cursor:",";"],(({isClickable:e})=>e?"pointer":"default")),_E=mb()(ky()((e=>(0,ae.jsx)(wE,{isClickable:"doNothing"!==e.item.actionOnClick.type,...e}))));var TE=n(8946),OE=n(76),IE=Math.ceil,xE=Math.max;const CE=function(e,t,n){t=(n?(0,OE.Z)(e,t,n):void 0===t)?1:xE(Nm(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Array(IE(r/t));i(0,G.iv)(["position:absolute;top:0;left:0;z-index:6;width:100%;height:100%;background:",";display:flex;flex-direction:column;justify-content:",";"],(0,Cf.ZP)(e).setAlpha(t/100).toRgbString(),my(n||"vertical-align-center")))),RE=G.ZP.div.attrs((({fontSize:e,buttonsScale:t,buttonOpacity:n,fontColor:r,buttonRounded:i,hasActionOnButton:o})=>({style:{whiteSpace:"normal",width:"100%",height:"100%",fontSize:e*t+"px",color:r,justifyContent:"center",alignItems:"center",textAlign:"center",opacity:n/100,borderRadius:.15*i*t,padding:15*t+"px",cursor:o?"pointer":"auto"}}))).withConfig({displayName:"Base__GridButton",componentId:"sc-1u33j5r-1"})(["overflow:hidden;display:flex;align-items:center;position:relative;background:",";&:hover{background:",";}"],(({buttonColor:e})=>e),(({buttonColor:e})=>(0,Cf.ZP)(e).saturate(30).toHexString())),LE=G.ZP.div.withConfig({displayName:"Base__GridButtonWrapper",componentId:"sc-1u33j5r-2"})(["flex:1;margin:",";"],(({margin:e})=>`${e}px`)),NE=G.ZP.div.attrs((({fontSize:e,fontStyle:t,color:n,buttonsScale:r})=>({style:{fontWeight:t.includes("bold")?"bold":void 0,fontStyle:t.includes("italic")?"italic":void 0,fontSize:e*r+"px",textDecoration:`${t.includes("underline")?"underline":""} ${t.includes("line-through")?"line-through":""}`,lineHeight:1.1*e*r+"px",color:n}}))).withConfig({displayName:"Base__GridTitle",componentId:"sc-1u33j5r-3"})([""]),PE=G.ZP.div.withConfig({displayName:"Base__GridAnimationDiv",componentId:"sc-1u33j5r-4"})((({buttonsScale:e,animationState:t,appearanceAnimation:n})=>{const r="entered"===t||"exiting"===t;return(0,G.iv)(["display:flex;flex-direction:column;padding:","px 0;padding-bottom:40px;align-items:center;justify-content:center;",""],20*e,"slide-top-bottom"===n&&(0,G.iv)(["transition-property:transform;transition-duration:500ms;transform:",";"],r?"translate(0, 0)":"translate(0, -100%)"))}));class BaseGridItem extends i.PureComponent{constructor(...e){super(...e),this.onButtonClick=e=>{const{item:t,item:{buttons:n},onButtonClick:r}=this.props,i=n[e];r({actionOnClick:i.actionOnClick,id:t.id+"|"+i.id,type:"grid"})}}render(){const{item:e,buttonsScale:t,getLabelForButton:n,titleText:r,animationState:i,onWrapperMouseDown:o}=this.props;return(0,ae.jsx)(kE,{onMouseDown:o,opacity:e.backgroundOpacity,backgroundColor:e.backgroundColor,children:(0,ae.jsxs)(PE,{animationState:i,buttonsScale:t,appearanceAnimation:e.appearanceAnimation,children:[(0,ae.jsx)(NE,{color:e.fontColor,fontSize:e.fontSize,fontStyle:e.fontStyle,buttonsScale:t,children:r}),(0,ae.jsx)(Ny,{width:"100%",height:"100%",margin:20*t+"px 0 0",padding:e.paddingButtonContainer/4*t+"px",flexShrink:0,children:CE(e.buttons.slice(0,e.buttonsCount),e.buttonsInRowCount).map(((r,i)=>(0,ae.jsx)(Ny,{container:!0,justifyContent:"center",children:r.map(((r,o)=>{const a=o+i*e.buttonsInRowCount;return(0,ae.jsx)(LE,{margin:e.paddingBetweenButtons/10*t,children:(0,ae.jsx)(RE,{buttonsScale:t,buttonColor:e.buttonColor,fontColor:e.buttonTextColor,buttonOpacity:e.buttonOpacity,buttonRounded:e.buttonRounded,fontSize:e.buttonFontSize,hasActionOnButton:"doNothing"!==r.actionOnClick.type,onClick:()=>this.onButtonClick(a),children:n(a)})},o)}))},i)))})]})})}}class PlayerGridComp extends i.PureComponent{constructor(...e){super(...e),this.handleButtonClick=e=>{this.props.onButtonClick(e)},this.getLabelForButton=e=>{const{item:{buttons:t}}=this.props;return t[e].label}}render(){const{item:e}=this.props;return(0,ae.jsx)(BaseGridItem,{...this.props,titleText:e.label,getLabelForButton:this.getLabelForButton,onButtonClick:this.handleButtonClick})}}const DE=Ty()(PlayerGridComp),BE=G.ZP.div.attrs((({item:e,buttonsScale:t})=>vy({buttonsScale:t,padding:5*t+"px",...e})))` display: flex; overflow: hidden; border-style: solid; word-break: break-word; `;const ME=Ty()(Iy({isInteractable:!1})(ky()((({onWrapperMouseDown:e,onWrapperDoubleClick:t,...n})=>(0,ae.jsx)(BE,{...n,children:n.item.label}))))),FE=G.ZP.div.attrs((({padding:e,buttonsScale:t,buttonsTitleIndent:n})=>({style:{padding:`${n*t}px ${e/2}% 0`}}))).withConfig({displayName:"Base__SurveyButtonsWrapper",componentId:"sc-7nls1n-0"})(["display:flex;width:100%;flex-direction:column;flex-shrink:0;"]),UE=G.ZP.div.attrs((({margin:e,buttonsScale:t})=>({style:{margin:e*t+"px 0"}}))).withConfig({displayName:"Base__SurveyButtonWrapper",componentId:"sc-7nls1n-1"})(["flex:1;"]),jE=G.ZP.div.attrs((({fontSize:e,fontColor:t,color:n,buttonsScale:r,horizontalPosition:i,indent:o})=>({style:{fontSize:e*r+"px",color:t,background:n,width:(5+e)*r+"px",height:(5+e)*r+"px",pointerEvents:"none",[i]:o*r+"px"}}))).withConfig({displayName:"Base__SurveyOptionMarker",componentId:"sc-7nls1n-2"})(["position:absolute;overflow:hidden;display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:50%;"]),HE=G.ZP.div.attrs((({fontSize:e,fontStyle:t,color:n,buttonsScale:r,textIndent:i})=>{const o=zm(t);return{style:{fontWeight:t.includes("bold")?"bold":void 0,fontStyle:t.includes("italic")?"italic":void 0,fontSize:e*r+"px",textDecoration:`${t.includes("underline")?"underline":""} ${t.includes("line-through")?"line-through":""}`,justifyContent:Xm(t),lineHeight:1.1*e*r+"px",color:n,..."left"===o?{paddingLeft:i*r/2+"%"}:{},..."right"===o?{paddingRight:i*r/2+"%"}:{}}}})).withConfig({displayName:"Base__SurveyTitle",componentId:"sc-7nls1n-3"})(["width:100%;display:flex;"]),VE=G.ZP.div.attrs((({fontSize:e,buttonsScale:t,buttonOpacity:n,fontColor:r,buttonRounded:i,hasActionOnButton:o,horizontalAlign:a,textIndent:s,borderColor:l,borderSize:u,buttonVerticalPadding:c})=>{const d=zm(a);return{style:{fontSize:e*t+"px",color:r,justifyContent:Xm(a),alignItems:"center",opacity:n/100,borderRadius:(c+e)*t*i/100+"px",paddingTop:c*t+"px",paddingBottom:c*t+"px",cursor:o?"pointer":"auto",..."left"===d?{paddingLeft:s/2+"%"}:{},..."right"===d?{paddingRight:s/2+"%"}:{},borderColor:l,borderWidth:u*t+"px"}}})).withConfig({displayName:"Base__SurveyButton",componentId:"sc-7nls1n-4"})(["overflow:hidden;display:flex;width:100%;white-space:normal;align-items:center;position:relative;background:",";border-style:solid;&:hover{background:",";}"],(({buttonColor:e})=>e),(({buttonColor:e})=>(0,Cf.ZP)(e).saturate(30).toHexString())),GE=G.ZP.div.withConfig({displayName:"Base__SurveyAnimationDiv",componentId:"sc-7nls1n-5"})((({buttonsScale:e,animationState:t,appearanceAnimation:n,verticalAlign:r,verticalIndent:i})=>{const o="entered"===t||"exiting"===t;return(0,G.iv)(["display:flex;flex-direction:column;"," "," align-items:center;justify-content:center;",""],"vertical-align-top"===r&&(0,G.iv)(["padding-top:","%;padding-bottom:40px;"],i),"vertical-align-bottom"===r&&(0,G.iv)(["padding-top:","px;padding-bottom:calc(","% + 40px);"],20*e,i),"slide-top-bottom"===n&&(0,G.iv)(["transition-property:transform;transition-duration:500ms;transform:",";"],o?"translate(0, 0)":"translate(0, -100%)"))})),zE=({item:e,item:{buttons:t},buttonsScale:n,getLabelForButton:r,titleText:o,animationState:a,onWrapperMouseDown:s,onButtonClick:l})=>{const u=(0,i.useCallback)((n=>{const r=t[n];l({actionOnClick:r.actionOnClick,id:e.id+"|"+r.id,type:"survey"})}),[l,e.id,t]);return(0,ae.jsx)(kE,{onMouseDown:s,opacity:e.backgroundOpacity,backgroundColor:e.backgroundColor,verticalAlign:e.verticalAlign,children:(0,ae.jsxs)(GE,{animationState:a,buttonsScale:n,appearanceAnimation:e.appearanceAnimation,verticalIndent:e.verticalIndent,verticalAlign:e.verticalAlign,children:[e.isTitleEnabled&&(0,ae.jsx)(HE,{color:e.fontColor,fontSize:e.fontSize,fontStyle:e.fontStyle,buttonsScale:n,textIndent:e.titleIndent,children:o}),(0,ae.jsx)(FE,{padding:e.paddingButtonContainer,buttonsScale:n,buttonsTitleIndent:e.buttonsTitleIndent,children:e.buttons.map(((t,i)=>(0,ae.jsx)(UE,{margin:e.paddingBetweenButtons,buttonsScale:n,children:(0,ae.jsxs)(VE,{buttonsScale:n,buttonVerticalPadding:e.buttonVerticalPadding,buttonColor:e.buttonColor,fontColor:e.buttonTextColor,buttonOpacity:e.buttonOpacity,buttonRounded:e.buttonRounded,fontSize:e.buttonFontSize,horizontalAlign:e.buttonFontHorizontalAlign,textIndent:e.buttonTextIndent,borderColor:e.buttonBorderColor,borderSize:e.buttonBorderSize,hasActionOnButton:"doNothing"!==t.actionOnClick.type,onClick:()=>u(i),children:[e.isMarkersEnabled&&(0,ae.jsx)(jE,{fontSize:e.markerFontSize,fontColor:e.markerFontColor,color:e.markerColor,buttonsScale:n,horizontalPosition:e.markerHorizontalPosition,indent:e.markerIndent,children:"number"===e.markerType?i+1:String.fromCharCode(65+i)}),r(i)]})},i)))})]})})},XE=(0,i.memo)(zE);class PlayerSurveyComp extends i.PureComponent{constructor(...e){super(...e),this.handleButtonClick=e=>{this.props.onButtonClick(e)},this.getLabelForButton=e=>{const{item:{buttons:t}}=this.props;return t[e].label}}render(){const{item:e}=this.props;return(0,ae.jsx)(XE,{...this.props,titleText:e.label,getLabelForButton:this.getLabelForButton,onButtonClick:this.handleButtonClick})}}const WE=Ty()(PlayerSurveyComp);var QE;function qE(){return qE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:n,titleId:r,...o}=e;return i.createElement("svg",qE({width:12,height:12,viewBox:"3 3 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?i.createElement("title",{id:r},n):null,QE||(QE=i.createElement("path",{d:"M20 6L9 17L4 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},YE=(0,i.forwardRef)(KE),ZE=(n.p,G.ZP.div.withConfig({displayName:"BaseQuiz__QuizWrapper",componentId:"sc-eno4wd-0"})((({backgroundColor:e,opacity:t})=>(0,G.iv)(["position:absolute;top:0;left:0;z-index:6;width:100%;height:100%;background:",";"],(0,Cf.ZP)(e).setAlpha(t/100).toRgbString())))),JE=G.ZP.div.attrs((({buttonsScale:e,buttonsTitleIndent:t})=>({style:{}}))).withConfig({displayName:"BaseQuiz__QuizButtonsWrapper",componentId:"sc-eno4wd-1"})(["display:flex;width:100%;flex-direction:column;flex-shrink:0;"]),$E=G.ZP.div.attrs((({margin:e,buttonsScale:t})=>({style:{margin:e*t+"px 0"}}))).withConfig({displayName:"BaseQuiz__QuizButtonWrapper",componentId:"sc-eno4wd-2"})(["flex:1;display:flex;justify-content:center;align-items:center;"]),eS=G.ZP.div.attrs((({fontSize:e,fontColor:t,color:n,buttonsScale:r,horizontalPosition:i,flexible:o=!1})=>{const a={fontSize:e*r+"px",color:t,background:n,height:(5+e)*r+"px",pointerEvents:"none",[i]:15*r+"px"};return o?Object.assign(a,{padding:"0 0.5em"}):Object.assign(a,{width:(5+e)*r+"px"}),{style:a}})).withConfig({displayName:"BaseQuiz__QuizOptionMarker",componentId:"sc-eno4wd-3"})(["position:absolute;overflow:hidden;display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:9999px;"]),tS=G.ZP.div.attrs((({fontSize:e,fontStyle:t,color:n,buttonsScale:r,textIndent:i})=>{const o=zm(t);return{style:{fontWeight:t.includes("bold")?"bold":void 0,fontStyle:t.includes("italic")?"italic":void 0,fontSize:e*r+"px",textDecoration:`${t.includes("underline")?"underline":""} ${t.includes("line-through")?"line-through":""}`,justifyContent:Xm(t),lineHeight:1.1*e*r+"px",color:n,..."left"===o?{paddingLeft:i*r/2+"%"}:{},..."right"===o?{paddingRight:i*r/2+"%"}:{}}}})).withConfig({displayName:"BaseQuiz__QuizTitle",componentId:"sc-eno4wd-4"})(["width:100%;display:flex;"]),nS=G.ZP.div.attrs((({fontSize:e,fontStyle:t,color:n,buttonsScale:r,textIndent:i})=>{const o=zm(t);return{style:{marginBottom:12*r,fontWeight:t.includes("bold")?"bold":void 0,fontStyle:t.includes("italic")?"italic":void 0,fontSize:e*r+"px",textDecoration:`${t.includes("underline")?"underline":""} ${t.includes("line-through")?"line-through":""}`,justifyContent:Xm(t),lineHeight:1.1*e*r+"px",color:n,..."left"===o?{paddingLeft:i*r/2+"%"}:{},..."right"===o?{paddingRight:i*r/2+"%"}:{}}}})).withConfig({displayName:"BaseQuiz__QuizMessage",componentId:"sc-eno4wd-5"})(["width:100%;display:flex;"]),rS=G.ZP.div.attrs((({fontSize:e,buttonsScale:t,buttonOpacity:n,fontColor:r,buttonRounded:i,hasActionOnButton:o,horizontalAlign:a,textIndent:s,borderColor:l,borderSize:u})=>{const c=zm(a);return{style:{fontSize:e*t+"px",color:r,justifyContent:Xm(a),alignItems:"center",opacity:n/100,borderRadius:(15+e)*t*i/100+"px",paddingTop:15*t+"px",paddingBottom:15*t+"px",cursor:o?"pointer":"auto",..."left"===c?{paddingLeft:s/2+"%"}:{},..."right"===c?{paddingRight:s/2+"%"}:{},borderColor:l,borderWidth:u*t+"px"}}})).withConfig({displayName:"BaseQuiz__QuizButton",componentId:"sc-eno4wd-6"})(["overflow:hidden;display:flex;width:100%;white-space:normal;align-items:center;position:relative;background:",";border-style:solid;&:hover{background:",";}"],(({buttonColor:e})=>e),(({buttonColor:e,hasActionOnButton:t})=>t?(0,Cf.ZP)(e).saturate(30).toHexString():"")),iS=(0,G.ZP)(rS).attrs((({fontSize:e,buttonsScale:t,style:n})=>({style:{padding:.75*e*t,...n}}))).withConfig({displayName:"BaseQuiz__QuizContinueButton",componentId:"sc-eno4wd-7"})(["width:auto;"]),oS=(0,G.ZP)((({buttonsScale:e,skipText:t,...n})=>(0,ae.jsxs)("button",{...n,type:"button",children:[t," ",(0,ae.jsx)(Ab,{})]}))).attrs((({buttonsScale:e})=>({style:{marginTop:6*e,fontSize:11*e,bottom:8*e,right:8*e,padding:`${10*e}px ${20*e}px`}}))).withConfig({displayName:"BaseQuiz__StyledSkipButton",componentId:"sc-eno4wd-8"})(["&&{position:absolute;z-index:2;text-transform:uppercase;font-weight:500;letter-spacing:0.5px;line-height:1;color:#fff;border:0;background:none;cursor:pointer;display:flex;align-items:center;&:hover{color:#fff;background:rgba(255,255,255,0.2);}svg{margin-left:8px;}}"]),aS=G.ZP.div.attrs((({item:e,buttonsScale:t})=>({style:{width:e.width*t+"px",height:e.height*t+"px"}}))).withConfig({displayName:"BaseQuiz__QuizAnimationDiv",componentId:"sc-eno4wd-9"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;",""],(({animationState:e,appearanceAnimation:t,item:n})=>{if("slide-top-bottom"!==t)return;const r="entered"===e||"exiting"===e;return(0,G.iv)(["transition-property:transform;transition-duration:500ms;transform:",";"],r?"translate(0, 0)":"translate(0, -100%)")})),sS=({item:e,buttonsScale:t,animationState:n,onWrapperMouseDown:r,selectedChoiceId:o,onContinue:a,onChoiceClick:s,onSkip:l,activeQuestionId:u,animationDivComponent:c=aS,stats:d,message:h})=>{const p=(0,i.useMemo)((()=>e.questions.find((e=>e.id===u))),[e.questions,u]),m=t=>{if(!e.showChoicePercentages)return null;if(!d||!p)return"0%";const n=d[p.id];if(!n)return"0%";return`${n[t.id]||0}%`};if(!p)return null;const g=p.choices.find((e=>e.id===o));return(0,ae.jsxs)(ZE,{onMouseDown:r,opacity:e.backgroundOpacity,backgroundColor:e.backgroundColor,children:[(0,ae.jsxs)(c,{animationState:n,buttonsScale:t,appearanceAnimation:e.appearanceAnimation,item:e,children:[!!h&&(0,ae.jsx)(nS,{color:e.fontColor,fontSize:e.fontSize,fontStyle:e.fontStyle,buttonsScale:t,textIndent:0,children:h}),!!p&&(0,ae.jsxs)(ae.Fragment,{children:[!!p.label&&(0,ae.jsx)(tS,{color:e.fontColor,fontSize:e.fontSize,fontStyle:e.fontStyle,buttonsScale:t,textIndent:0,children:p.label}),(0,ae.jsxs)(JE,{buttonsScale:t,buttonsTitleIndent:0,children:[p.choices.map(((n,r)=>(0,ae.jsx)($E,{margin:4,buttonsScale:t,children:(0,ae.jsxs)(rS,{buttonsScale:t,buttonColor:e.buttonColor,fontColor:e.buttonTextColor,buttonOpacity:e.buttonOpacity,buttonRounded:e.buttonRounded,fontSize:e.buttonFontSize,horizontalAlign:e.buttonFontHorizontalAlign,textIndent:0,borderColor:e.buttonBorderColor,borderSize:e.buttonBorderSize,hasActionOnButton:!o&&"doNothing"!==n.action.type,onClick:e=>{e.stopPropagation(),o||s?.(n)},children:[e.isMarkersEnabled&&(0,ae.jsx)(eS,{fontSize:e.markerFontSize,fontColor:e.markerFontColor,color:e.markerColor,buttonsScale:t,horizontalPosition:e.markerHorizontalPosition,children:"number"===e.markerType?r+1:String.fromCharCode(65+r)}),n.label,!!o&&(e.showChoicePercentages||e.showCorrectAnswers)&&(0,ae.jsxs)(eS,{fontSize:e.markerFontSize,fontColor:e.markerFontColor,color:e.markerColor,buttonsScale:t,horizontalPosition:"left"===e.markerHorizontalPosition?"right":"left",flexible:!0,children:[e.showCorrectAnswers&&(n.isCorrect?(0,ae.jsx)(YE,{}):(0,ae.jsx)(pm.r,{})),e.showCorrectAnswers&&e.showChoicePercentages&&"\xa0\xa0",m(n)]})]})},r))),!!o&&(0,ae.jsx)($E,{margin:4,buttonsScale:t,children:(0,ae.jsxs)(iS,{buttonsScale:t,buttonColor:e.actionButtonColor,fontColor:e.actionButtonTextColor,buttonOpacity:e.buttonOpacity,buttonRounded:e.buttonRounded,fontSize:e.actionButtonFontSize,horizontalAlign:e.buttonFontHorizontalAlign,textIndent:0,borderColor:e.buttonBorderColor,borderSize:e.buttonBorderSize,color:e.buttonTextColor,hasActionOnButton:!0,onClick:a,children:["endQuiz"===g?.action.type?e.finishButtonText:e.continueButtonText," ",(0,ae.jsx)(Ab,{width:.8*e.actionButtonFontSize*t,height:.5*e.actionButtonFontSize*t,style:{marginLeft:.35*e.actionButtonFontSize*t}})]})})]})]})]}),!e.isRequired&&(0,ae.jsx)(oS,{skipText:e.skipButtonText,buttonsScale:t,onClick:l})]})},lS=(0,i.memo)(sS),uS=Iy({isInteractable:!0})(aS),cS=Ty()((e=>{const{item:t,onDismiss:n}=e,r=(0,de.I0)(),o=(0,de.v9)(bo.hn),[a,s]=(0,i.useState)({type:"question",questionId:e.item.questions[0].id}),[l,u]=(0,i.useState)(""),c=(0,i.useRef)(0),d=(0,i.useRef)({}),[h,p]=(0,i.useState)(void 0),m=(0,i.useCallback)((()=>t.actionsOnExit.filter(((e,t,n)=>!n.slice(0,t).find((t=>t.minNumberOfCorrectAnswers===e.minNumberOfCorrectAnswers)))).sort(((e,t)=>e.minNumberOfCorrectAnswers-t.minNumberOfCorrectAnswers)).reverse().find((e=>e.minNumberOfCorrectAnswers<=c.current))),[t.actionsOnExit]),g=(0,i.useCallback)((e=>{e.isQuiz||(re.A7.setItem(Ro(t),(new Date).toDateString()),!e.isSkipped&&re.A7.setItem(Lo(t),(new Date).toDateString())),r(ga({itemId:t.id,answers:d.current}));const n=m();"retakeQuiz"===n.action.type?(s({type:"question",questionId:t.questions[0].id}),c.current=0,d.current={},n.action.message&&u(n.action.message)):r(pn({action:n.action,initiator:t}))}),[t,r,m]),v=(0,i.useCallback)((e=>{if("gotoQuestion"===e.action.type){if(!e.action.questionId)return;s({type:"question",questionId:e.action.questionId}),u("")}else if("endQuiz"===e.action.type){if("retakeQuiz"===m().action.type)return void g({isQuiz:!0});t.turnstile.enabled&&Po(t)?s({type:"turnstile"}):(g({isQuiz:!0}),n(t))}else"retakeQuiz"===e.action.type?(s({type:"question",questionId:t.questions[0].id}),c.current=0,d.current={},e.action.message&&u(e.action.message)):r(pn({initiator:t,action:e.action}))}),[s,t,n,r,g,m]),y=(0,de.v9)(Jo),b=(0,de.v9)(Mb),E=(0,de.v9)((e=>e.sourceConfiguration.current?.file)),S=(0,de.v9)((e=>e.sourceConfiguration?.current?.funnelId)),A=(0,de.v9)((e=>e.sourceConfiguration?.current?.currentFunnelNodeId)),w=(0,i.useCallback)((e=>{if(r(bn(void 0)),"question"!==a.type)return;const n=t.questions.find((e=>e.id===a.questionId));n&&(d.current[n.id]=e.id,e.isCorrect&&(c.current+=1),t.showChoicePercentages||t.showCorrectAnswers?s((t=>({...t,selectedChoiceId:e.id}))):v(e),y?.fromEmitter.timelineQuizChoice.emit({quizId:t.id,question:n,choice:e}))}),[t,v,s,a,y?.fromEmitter.timelineQuizChoice,r]),_=(0,i.useCallback)((()=>{if("question"!==a.type)return;const e=t.questions.find((e=>e.id===a.questionId));if(!e)return;const n=e.choices.find((e=>e.id===a.selectedChoiceId));n&&v(n)}),[a,t.questions,v]),T=(0,i.useCallback)((()=>{n(t)}),[n,t]),O=(0,i.useCallback)((async()=>{g({isSkipped:!0}),n(t)}),[g,t,n]),I=(0,i.useCallback)((async e=>{const n=t.turnstile.isNameRequired?{firstName:e.firstName,lastName:e.lastName,email:e.email}:{email:e.email};if(b)return y?.fromEmitter?.timelineTurnstileCompleted.emit(n),g({}),!0;if(!S&&!E)return alert(t.turnstile.failedToSubmitText),!1;try{let e;if(e="voomly"===t.turnstile.integrationConfig?.name?await Bb({body:n,funnelId:S,videoId:E?.id,turnstileItemId:t.id,funnelNodeId:A}):await Pb({body:n,turnstileItemId:t.id,...S?{funnelId:S}:{videoId:E?.id}}),!e?.ok)throw Error("Send email failed")}catch(r){console.log("ignore")}return y?.fromEmitter?.timelineTurnstileCompleted.emit(n),g({}),!0}),[g,t,b,S,E,y,A]);return Wf((async()=>{if(t.showChoicePercentages&&o?.id){const[e,n]=await(0,ue.Z)(Tl.default.get((0,Ol.b)(`/analytics-v2/videos/${o.id}/quiz/${t.id}`)));if(n){const e={};n.data.forEach((t=>{e[t.id]={},t.choices.forEach((n=>{e[t.id][n.id]=Math.round(n.percentage)}))})),p(e)}else console.log("Error while loading quiz percentages",e)}})),"question"===a.type?(0,ae.jsx)(lS,{...e,stats:h,onChoiceClick:w,onContinue:_,selectedChoiceId:a.selectedChoiceId,activeQuestionId:a.questionId,message:l,onSkip:T,animationDivComponent:uS}):"turnstile"===a.type?(0,ae.jsx)(Nb,{item:t.turnstile,isPreviewMode:!1,buttonsScale:e.buttonsScale,onWrapperMouseDown:e.onWrapperMouseDown,onSkip:O,titleText:t.turnstile.titleText,subTitleText:t.turnstile.subTitleText,formFirstNameText:t.turnstile.formFirstNameText,formLastNameText:t.turnstile.formLastNameText,formEmailText:t.turnstile.formEmailText,onSubmit:I}):null})),dS={PlainText:ME,Button:Ry,Annotation:vb,ShareGate:PlayerShareGateItem,Turnstile:e=>{const{item:t,onDismiss:n}=e,r=(0,de.v9)((e=>e.sourceConfiguration.current?.file)),o=(0,de.v9)((e=>e.sourceConfiguration?.current?.funnelId)),a=(0,de.v9)((e=>e.sourceConfiguration?.current?.currentFunnelNodeId)),s=(0,i.useContext)(Fb),l=(0,de.v9)(Mb),u=(0,i.useCallback)((()=>{re.A7.setItem(Ro(t),(new Date).toDateString()),re.A7.setItem(Lo(t),(new Date).toDateString()),n(t)}),[t,n]),c=(0,i.useCallback)((()=>{re.A7.setItem(Ro(t),(new Date).toDateString()),n(t)}),[t,n]),d=(0,i.useCallback)((async()=>{s?.fromEmitter?.timelineTurnstileSkipped.emit(),c()}),[s?.fromEmitter?.timelineTurnstileSkipped,c]),h=(0,i.useCallback)((async e=>{const n=t.isNameRequired?{firstName:e.firstName,lastName:e.lastName,email:e.email}:{email:e.email};if(l)return s?.fromEmitter?.timelineTurnstileCompleted.emit(n),u(),!0;if(!o&&!r)return alert(t.failedToSubmitText),!1;try{let e;if(e="voomly"===t.integrationConfig?.name?await Bb({body:n,funnelId:o,videoId:r?.id,turnstileItemId:t.id,funnelNodeId:a}):await Pb({body:n,turnstileItemId:t.id,...o?{funnelId:o}:{videoId:r?.id}}),!e?.ok)throw Error("Send email failed")}catch(i){console.log("ignore")}return s?.fromEmitter?.timelineTurnstileCompleted.emit(n),u(),!0}),[r,o,t,u,s,l,a]);return(0,ae.jsx)(Nb,{...e,onSubmit:h,onSkip:d,isPreviewMode:!1,titleText:t.titleText,subTitleText:t.subTitleText,formFirstNameText:t.formFirstNameText||"First name",formLastNameText:t.formLastNameText||"Last name",formEmailText:t.formEmailText||"Email address"})},Image:bE,ImageAnnotation:_E,Grid:DE,Survey:WE,Quiz:cS};class PlayerComponentsProvider extends i.PureComponent{render(){const{children:e}=this.props;return(0,ae.jsx)(om.Provider,{value:dS,children:e})}}const fS=i.lazy((()=>n.e(892).then(n.bind(n,8892)))),hS=i.lazy((()=>Promise.all([n.e(108),n.e(472),n.e(411)]).then(n.bind(n,4411)).then((({ErrorStub:e})=>({default:e}))))),pS=(e,t)=>{if(!!e.security?.enabled!=!(!t?.playerConfigToMerge?.security?.enabled&&!t?.playerConfigToReplace?.security?.enabled))return e;const n=t;return n?.playerConfigToReplace??(n?.playerConfigToMerge?{...e,...n?.playerConfigToMerge}:e)},mS=({embedVideoId:e,ratio:t,skinColor:n,onVideoFinished:r,onNavigateToOtherNodeRequest:o,playbackSettings:a,playerMode:s,onTimeChange:l,isRememberDismissEnabled:u,isNativeFullscreenFallbackEnabled:c,onLoaded:d,onLoadedPasswordForm:h,disableShortcuts:p,disableControls:m,playerExternalAPI:g,dontShowLoaderBackground:v,externalPlayerConfig:y})=>{const b=(0,i.useRef)(),[E,S]=(0,i.useState)(),[A,w]=(0,i.useState)(),[_,T]=(0,i.useState)(void 0),[O,I]=(0,i.useState)(void 0),x=(0,i.useMemo)((()=>[]),[]),C=(0,i.useCallback)((async()=>{if(!e)return void I({message:"Video is missing"});if(y?.video&&y?.playerConfigToReplace){const e={...y?.playerConfigToReplace,videoId:y.video.id},t=y.video,n=cy(e);return S(t),w(n),b.current?.assignPlayer(n,t,y.playerMode??ie.V.NORMAL),void d?.(n,t)}const[t,n]=await(0,ue.Z)((0,ce.Yz)(e));if(n){const{data:e}=n;if((0,ce.MG)(e))T(e),h?.(pS(e.player,y),e.video);else{const t={...e,player:cy(pS(e.player,y))};S(t.video),w(t.player),b.current?.assignPlayer(t.player,t.video,s),d?.(t.player,t.video)}}else I({message:t.message})}),[s,e,d,h,y]);(0,i.useEffect)((()=>(b.current=new AskToResumeOnVisitWatcher,b.current.setEmbedVideoId(e),C(),()=>{b?.current?.destruct(),b.current=void 0})),[e,C]);const k=(0,i.useCallback)(((e,t)=>{b.current?.updateLastTime(e),l?.(e,t)}),[l]),R=(0,i.useCallback)(((e,{player:t,video:n})=>{S(n),w(t),T(void 0),b.current?.assignPlayer(t,n,s),d?.(t,n),g&&g.fromEmitter.timelineUnlock.emit({password:e})}),[g,s,d]),L=(0,i.useMemo)((()=>(0,ae.jsx)(ld.a,{withBackground:!v,color:A?.skin.bgColorEnabled?A.skin.bgColor:n})),[A?.skin.bgColorEnabled,A?.skin.bgColor,n,v]);if(E&&A){const e={onTimeChange:k,onVideoFinished:r,onNavigateToOtherNodeRequest:o,playbackSettings:a,playerMode:s,isRememberDismissEnabled:u,isNativeFullscreenFallbackEnabled:c,playerConfig:A,file:E,playerExternalAPI:g,ratio:t,disableShortcuts:p,disableControls:m};return(0,ae.jsx)(Fb.Provider,{value:g,children:(0,ae.jsx)(le,{children:(0,ae.jsx)(PlayerComponentsProvider,{children:(0,ae.jsx)(DetachableStoreProviderForPlayer,{timelineItems:A.timelineItems??x,thumbnailItems:A.thumbnailItems??x,children:(0,ae.jsx)(Ov,{...e})})})})})}return _?_&&e?(0,ae.jsx)(sd.T,{ratio:t,children:(0,ae.jsx)(i.Suspense,{fallback:L,children:(0,ae.jsx)(fS,{embedVideoId:e,lockedPlayer:_.player,lockedFile:_.video,onUnlock:R,skinColor:_.player?.skinColor?_.player.skinColor:n})})}):null:(0,ae.jsx)(sd.T,{ratio:t,children:O?(0,ae.jsx)(i.Suspense,{fallback:L,children:(0,ae.jsx)(hS,{error:O})}):L})},gS=(0,i.memo)(mS);let vS,yS;vS=()=>null,yS=()=>null;const bS=({id:e,type:t,ratio:n,onLoaded:r,onLoadedPasswordForm:o,playerExternalAPI:a,disableShortcuts:s,onMounted:l,disableControls:u,skinColor:c,dontShowLoaderBackground:d,externalPlayerConfig:h})=>{const p=(0,i.useMemo)((()=>({currentTime:0,lastVisitWatchedSeconds:oe(e),...h?.initialPlaybackSettings?h.initialPlaybackSettings:{}})),[e,h?.initialPlaybackSettings]),m=(e=>{if(!e)return;if(!e.includes(":"))return parseFloat(e);const t=e.split(":");return parseInt(t[0],10)/parseInt(t[1],10)})("number"==typeof n?n.toFixed(6):n)||1.7777;let g;if(Wf((()=>{l?.()})),"v"===t&&(g=(0,ae.jsx)(le,{children:(0,ae.jsx)(gS,{ratio:m,embedVideoId:e,playerMode:h?.playerMode??ie.V.NORMAL,isRememberDismissEnabled:h?.isRememberDismissEnabled??!0,isNativeFullscreenFallbackEnabled:h?.isNativeFullscreenFallbackEnabled??!1,playbackSettings:p,onLoaded:r,onLoadedPasswordForm:o,playerExternalAPI:a,disableShortcuts:s,disableControls:u,dontShowLoaderBackground:d,skinColor:c,externalPlayerConfig:h})})),"f"===t){const t={ratio:m,funnelId:e,playerMode:h?.playerMode??ie.V.NORMAL,isRememberDismissEnabled:h?.isRememberDismissEnabled??!0,isNativeFullscreenFallbackEnabled:h?.isNativeFullscreenFallbackEnabled??!1,disableShortcuts:s,dontShowLoaderBackground:d,playerExternalAPI:a,skinColor:c,onLoaded:r,onLoadedPasswordForm:o,externalPlayerConfig:h};g=(0,ae.jsx)(vS,{...t})}if("c"===t){const t={ratio:m,videoCollectionId:e,playerMode:h?.playerMode??ie.V.NORMAL,isRememberDismissEnabled:h?.isRememberDismissEnabled??!0,isNativeFullscreenFallbackEnabled:h?.isNativeFullscreenFallbackEnabled??!1,disableShortcuts:s,dontShowLoaderBackground:d,playerExternalAPI:a,skinColor:c,onLoaded:r,onLoadedPasswordForm:o,externalPlayerConfig:h};g=(0,ae.jsx)(yS,{...t})}return g||(console.error(`Unknown playable type: ${t}`),(0,ae.jsx)("div",{}))},ES=(0,i.memo)(bS),SS=e=>`[voomly-embed-player] ${e}`,AS=(0,G.vJ)([".voomly-embed{font-size:0 !important;--azure-500:#008EFF;}"]),wS=[{type:"floatingModal",scriptName:"embed-view-floating-modal"},{type:"openInModal",scriptName:"embed-view-open-in-modal"}],_S=wS.map((e=>e.type)),TS=new Map,OS=new Map,IS=new Map,xS=e=>OS.get(e),CS=e=>IS.get(e),kS=(e,t,n="v",r="auto",o,s,l)=>{const u=null!==e.getAttribute("data-shadow"),c=xS(e);if(null!==e.getAttribute("data-initialized")&&c)return c;e.setAttribute("data-initialized","");const d=new PlayerExternalAPI(t,{mountNode:e,isInIframe:window.location!==window.parent.location}),h=J(d,["register","fromEmitter"]);return new PlayerInViewportObserver(e,h).run(),RS((async o=>{const c=({onLoaded:i,onLoadedPasswordForm:o,dontPassPlayerExternalAPI:a,disableShortcuts:u,disableControls:c,dontShowLoaderBackground:h})=>(0,ae.jsx)(ES,{id:t,type:n,ratio:r,onLoaded:i,onLoadedPasswordForm:o,disableShortcuts:u,disableControls:c,onMounted:()=>e.style.cssText="",skinColor:s,dontShowLoaderBackground:h,playerExternalAPI:a?void 0:d,externalPlayerConfig:l}),p=({portalInto:e})=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(AS,{}),o?(0,ae.jsx)(o,{id:t,type:n,ratio:r,playerExternalAPI:d,portalInto:e,children:c}):c({})]}),m=e.getElementsByClassName("voomly-embed-loader");if(m.length)for(const e of m)e.remove();if(u){const t=await new Promise((e=>{const t=t=>{const n=document.querySelector("link[data-voomly-styles]");if(n){if(null!==n.getAttribute("data-loaded"))return t?.(),e(n.href);{const r=()=>{document.removeEventListener("voomly-styles-loaded",r),t?.(),e(n.href)};document.addEventListener("voomly-styles-loaded",r)}}};if(document.querySelector("link[data-voomly-styles]"))return t();new MutationObserver(((e,n)=>{t((()=>n.disconnect()))})).observe(document.documentElement,{childList:!0,subtree:!0})})),n=k(p,{styles:C((g=[t],(e,t,n,r,o)=>{const a=g.map((e=>{const t=document.createElement("link");return t.rel="stylesheet",t.href=e,t}));return o.append(...a),t=>{const n=(0,i.useRef)(new Set);return x((e=>{e.forEach((e=>{if(!n.current.has(e)){n.current.add(e);const t=a.map((e=>e.cloneNode(!0)));e.stylesWrapper.append(...t)}}))})),i.createElement(e,Object.assign({},t))}}),Y())}),r=(()=>{const e=U(),t=document.createElement("div");t.id=e;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),i=document.createElement("div");return r.classList.add("inject-react-anywhere-portal-mounted-into"),n.appendChild(r),n.appendChild(i),{shadowHost:t,shadowRoot:n,portalInto:r,stylesWrapper:i}})();r.shadowHost.classList.add("voomly-portal");const o=await V(n,{portalInto:r.portalInto},{includeCssReset:!1,shadowHost:e});o.stylesWrapper.classList.add("voomly-styles"),o.shadowHost.classList.add("voomly-shadow-host"),o.mountedInto.classList.add("voomly-embed"),d.onAPIReady((()=>{o.mountedInto.setAttribute("style","display: grid")})),document.body.appendChild(r.shadowHost),o.connectPortal(r)}else a.createRoot(e).render((0,ae.jsx)(p,{}));var g;new PlayerTimestamper(t,h).run(),TS.set(e,!0),window.voomlyEmbedPlayerPreloader?.callPreviouslyCalledMethod(e)}),o),((e,t="v",n,r)=>{const i=IS.get(e),o=i?.filter((e=>{const t=e.element.isConnected;return t||e.api.destroy(),t}));o&&IS.set(e,o);const a={id:e,type:t,api:r,element:n};if(i)return i.push(a),a;IS.set(e,[a])})(t,n,e,h),OS.set(e,h),window.voomlyEmbedPlayerPreloader?.emitAttached({id:t,type:n,api:h,element:e}),h},RS=async(e,t)=>{const n=[],r=window.voomlyEmbedPlayerPreloader?.manifest;if(!r)throw Error("Manifest is not loaded");const i=e=>(t,n)=>{console.error(SS(`Failed to load ${t}`),n),e()};wS.forEach((({scriptName:e,type:o})=>{if(t!==o)return;const a=r?r[`${e}.js`]:"";n.push(new Promise(((t,n)=>{(e=>{const t=document.getElementById(e.id);if(t)return void("true"===t.dataset.loaded?e.onLoad():t.addEventListener("load",(()=>{e.onLoad()})));const n=document.getElementsByTagName("script"),r=e.preloaderScript?Array.from(n).find((t=>e.preloaderScript&&t.src.includes(e.preloaderScript))):void 0,i=document.createElement("script");i.id=e.id,i.defer=!0;try{i.src=e.url,i.onload=()=>{i.dataset.loaded="true",e.onLoad()},r?r.parentNode?.insertBefore(i,r.nextSibling):document.body.appendChild(i)}catch(o){e.onError(e.url,o instanceof Error?o:new Error(o))}})({id:e,url:a,onLoad:()=>t(),onError:i(n)})})))})),Promise.all(n).then((()=>{e(t?window.voomlyEmbedPlayerPresentationLayers?.[t]:void 0)})).catch((e=>{console.error(SS("Cannot load presentation layers"),e)}))},LS=(e,t)=>{for(const r of e){const e=r.getAttribute("data-id"),i=r.getAttribute("data-type")||"v",o=r.getAttribute("data-ratio")||"auto",a=r.getAttribute("data-skin-color")||void 0,s=r.getAttribute("data-config-player-mode"),l=s?parseInt(s):void 0;void 0!==l&&isNaN(l)&&console.error("Cannot parse player mode");const u=r.getAttribute("data-config-is-remember-dismiss-enabled")||void 0;let c;try{c=u?JSON.parse(u):void 0}catch(n){console.error('Cannot parse "isRememberDismissEnabled"')}const d=r.getAttribute("data-config-replace");let h;try{h=d?JSON.parse(d):void 0}catch(n){console.error("Cannot parse player config to replace")}const p=r.getAttribute("data-config-merge");let m;try{m=p?JSON.parse(p):void 0}catch(n){console.error("Cannot parse player config to merge in")}const g=r.getAttribute("data-config-video");let v;try{v=g?JSON.parse(g):void 0}catch(n){console.error("Cannot parse video descriptor")}const y=r.getAttribute("data-config-initial-playback-settings");let b;try{b=y?JSON.parse(y):void 0}catch(n){console.error("Cannot parse initial playback settings descriptor")}const E=r.getAttribute("data-config-misc-spotlight-id")||void 0,S=Boolean(r.getAttribute("data-native-fullscreen")||!1),A=m||h||l||void 0!==c?{playerConfigToMerge:m,playerConfigToReplace:h,playerMode:l,isRememberDismissEnabled:c,isNativeFullscreenFallbackEnabled:S,video:v,initialPlaybackSettings:b,misc:{spotlightId:E}}:{isNativeFullscreenFallbackEnabled:S};let w=r.getAttribute("data-presentation");if(!["v","f","c"].includes(i)){console.error("Wrong data-type!",i);continue}if(w&&!_S.includes(w)&&(console.error("Wrong data-presentation!",w,"Fallback to original"),w=void 0),!e){console.error("Missing id!");continue}const _=kS(r,e,i,o,w,a,A);t?.(r,_)}};let NS;window.voomlyEmbedPlayerApp={attach:kS,attachAll:()=>{const e=new Map,t=[],n=[],r=document.getElementsByClassName("voomly-embed");return r.length&&LS(Array.from(r),((e,r)=>{n.push(e),t.push(r)})),t.forEach(((t,r)=>{e.set(n[r],t)})),e},startAttachChecker:()=>{NS=setInterval((()=>{const e=[],t=document.getElementsByClassName("voomly-embed");for(const n of t)null===n.getAttribute("data-initialized")&&e.push(n);e.length&&LS(e)}),1e3)},stopAttachChecker:()=>{NS&&clearInterval(NS)},getPlayerExternalAPIByContainer:xS,getPlayerExternalAPILoadStatusByContainer:e=>TS.get(e),getPlayerExternalAPIById:e=>CS(e)?.[0].api,getAllPlayerDescriptorsById:CS},window.voomlyReact=o,window.voomlyReactDom=s,window.voomlyReactPortal=r,window.voomlyEmbedPlayerPresentationLayers=window.voomlyEmbedPlayerPresentationLayers??{}},4144:(e,t,n)=>{"use strict";n.d(t,{MG:()=>a,Vh:()=>s,Yz:()=>o});var r=n(3344),i=n(7129);const o=e=>r.default.get((0,i.b)(`/embed-videos/${e}`)),a=e=>!!e.player.security?.enabled,s=(e,t)=>r.default.post((0,i.b)(`/embed-videos/${e}/get`),{password:t})},7573:(e,t,n)=>{"use strict";n.d(t,{Xx:()=>S,tg:()=>E});var r=n(2784),i=n(4616),o=n(8316);const a=Symbol(),s=Symbol(),l="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?r.useEffect:r.useLayoutEffect,u=i.unstable_runWithPriority?e=>(0,i.unstable_runWithPriority)(i.unstable_NormalPriority,e):e=>e();function c(e,t){const n=(0,r.useContext)(e)[a];const{v:{current:i},n:{current:o},l:s}=n,u=t(i),[c,d]=(0,r.useReducer)(((e,n)=>{if(!n)return[i,u];if("p"in n)throw n.p;if(n.n===o)return Object.is(e[1],u)?e:[i,u];try{if("v"in n){if(Object.is(e[0],n.v))return e;const r=t(n.v);return Object.is(e[1],r)?e:[n.v,r]}}catch(e){}return[...e]}),[i,u]);return Object.is(c[1],u)||d(),l((()=>(s.add(d),()=>{s.delete(d)})),[s]),c[1]}var d=n(7894),h=n(9288),p=n(5183);var m=n(2322);function g(e){const t={value:!1},n=new Promise(((n,r)=>{e.then((e=>{t.value||n(e)})).catch((e=>{r(t.value?t:e)}))}));return{promise:n,cancel:()=>{t.value=!0}}}const v=(e,t)=>{let i=e.skin.controlBarSkin;"flat"===i&&(console.error('Skin "flat" is deprecated, use "default" instead. Backend migration required.'),i="default");const[o,a]=(0,r.useState)(!0),[s,l]=(0,r.useState)(void 0),u=(0,r.useMemo)((()=>new Map),[]);return(0,r.useEffect)((()=>{if(!t)return;const e=g((async()=>await Promise.all([n.e(108),n.e(835),n.e(189),n.e(943),n.e(876),n.e(361),n.e(446),n.e(333),n.e(279),n.e(631),n.e(536),n.e(272)]).then(n.bind(n,6272)))());if(u.has(i))return void l(u.get(i));const r=g((async()=>{try{a(!0);(await e.promise).default.forEach((e=>{u.set(e.key,e)})),l(u.get(i)),a(!1)}catch(t){a(!1)}})());return()=>{e.cancel(),r.cancel()}}),[i,t,u]),(0,r.useEffect)((()=>{if(t)return;const e=g((async e=>{switch(e){case"pult":return(await Promise.all([n.e(108),n.e(189),n.e(569)]).then(n.bind(n,189))).pultSkin;case"rounded":return(await Promise.all([n.e(108),n.e(631),n.e(404)]).then(n.bind(n,1631))).roundedSkin;case"line":return(await Promise.all([n.e(108),n.e(279),n.e(634)]).then(n.bind(n,2279))).lineSkin;case"panel":return(await Promise.all([n.e(108),n.e(835)]).then(n.bind(n,835))).panelSkin;case"buttons":return(await Promise.all([n.e(108),n.e(333),n.e(102)]).then(n.bind(n,2333))).buttonsSkins;case"circles":return(await Promise.all([n.e(108),n.e(361),n.e(757)]).then(n.bind(n,9361))).circlesSkin;case"gradient":return(await Promise.all([n.e(108),n.e(446),n.e(690)]).then(n.bind(n,3446))).gradientSkin;case"wellRounded":return(await Promise.all([n.e(108),n.e(876),n.e(578)]).then(n.bind(n,7876))).wellRoundedSkin;case"bottomProgressBar":return(await Promise.all([n.e(108),n.e(943),n.e(309)]).then(n.bind(n,8943))).bottomProgressBarSkin;default:return(await Promise.all([n.e(108),n.e(536),n.e(913)]).then(n.bind(n,6536))).defaultSkin}})(i));if(u.has(i))return void l(u.get(i));const r=g((async()=>{try{a(!0);const t=await e.promise;u.set(i,t),l(t),a(!1)}catch(t){a(!1)}})());return()=>{e.cancel(),r.cancel()}}),[i,t,u]),(0,r.useMemo)((()=>[s,o||!s]),[s,o])},y=function(e){const t=(0,r.createContext)({[a]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[s]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const i=(0,r.useRef)(e),s=(0,r.useRef)(0),[c,d]=(0,r.useState)(null);c&&(c(e),d(null));const h=(0,r.useRef)();if(!h.current){const e=new Set,t=(t,n)=>{(0,o.unstable_batchedUpdates)((()=>{s.current+=1;const r={n:s.current};null!=n&&n.suspense&&(r.n*=-1,r.p=new Promise((e=>{d((()=>t=>{r.v=t,delete r.p,e(t)}))}))),e.forEach((e=>e(r))),t()}))};h.current={[a]:{v:i,n:s,l:e,u:t}}}return l((()=>{i.current=e,s.current+=1,u((()=>{h.current[a].l.forEach((t=>{t({n:s.current,v:e})}))}))}),[e]),(0,r.createElement)(n,{value:h.current},t)}),delete t.Consumer,t}({skin:void 0}),b=e=>e.skin,E=()=>c(y,b),S=({player:e,playerMode:t,loaderRatio:n,children:r})=>{const[i,o]=v(e,t===p.V.TIMELINE_EDITOR);return o?(0,m.jsx)(d.T,{ratio:n,children:(0,m.jsx)(h.a,{color:e&&e.skin.bgColorEnabled?e.skin.bgColor:void 0})}):(0,m.jsx)(y.Provider,{value:{skin:i},children:r})}},5247:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(2784);n(2322);const i=(0,r.createContext)(void 0),o=()=>(0,r.useContext)(i)},5183:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});let r=function(e){return e[e.NORMAL=1]="NORMAL",e[e.PLAYER_PREVIEW=2]="PLAYER_PREVIEW",e[e.TIMELINE_EDITOR=3]="TIMELINE_EDITOR",e[e.THUMBNAIL_EDITOR=4]="THUMBNAIL_EDITOR",e[e.MINI_PLAYER=5]="MINI_PLAYER",e}({})},1484:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});const r=e=>e.askToResumeOnVisitOverlay.visibleAskToResumeOverlay},9798:(e,t,n)=>{"use strict";n.d(t,{$Q:()=>l,Eb:()=>i,FL:()=>a,Gu:()=>u,L2:()=>s,Z0:()=>r,sZ:()=>h,ww:()=>c,y3:()=>d,yz:()=>o});const r=e=>e/530,i=e=>e.dimensions.forceAspectRatio,o=e=>e.dimensions.isFullScreen,a=e=>e.dimensions.isNativeFullScreenFallbackEnabled,s=e=>Math.ceil(e.dimensions.containerDimensions.width),l=e=>Math.ceil(e.dimensions.containerDimensions.height),u=e=>Math.ceil(e.dimensions.videoDimensions.width),c=e=>Math.ceil(e.dimensions.videoDimensions.height),d=e=>r(u(e)),h=e=>r(s(e))},6541:(e,t,n)=>{"use strict";n.d(t,{$W:()=>w,CQ:()=>g,CZ:()=>c,DP:()=>p,Ee:()=>v,FM:()=>E,OE:()=>S,P4:()=>y,R3:()=>_,Tb:()=>A,Tr:()=>O,Zh:()=>T,gh:()=>u,hn:()=>h,it:()=>d,m2:()=>m});var r=n(5994),i=n(6580),o=n(5183),a=n(5742);const s=[],l=[],u=e=>e.sourceConfiguration.next,c=e=>e.sourceConfiguration.current?.playbackSettings,d=e=>e.sourceConfiguration.current?.playerConfig,h=e=>e.sourceConfiguration.current?.file,p=e=>{const t=e.sourceConfiguration.current,n=t?{videoId:t.file.id,funnelId:t.funnelId,nodeId:t.currentFunnelNodeId,spotlightId:t.spotlightId}:void 0,r=(n?[n.videoId,n.funnelId,n.nodeId,n.spotlightId]:[]).join("|");return n&&{ids:n,id:r}},m=e=>e.sourceConfiguration.current?.playerMode,g=e=>e.sourceConfiguration.current?.funnelId,v=e=>e.sourceConfiguration.current?.currentFunnelNodeId,y=e=>e.sourceConfiguration.current?.playerConfig.chapters?.enabled&&e.sourceConfiguration.current?.playerConfig.chapters?.isVisibleOnLoad,b=e=>e.sourceConfiguration,E=e=>e.sourceConfiguration.current,S=e=>e.sourceConfiguration.nextCurrentTime??e.sourceConfiguration.next?.playbackSettings.currentTime,A=(0,r.P1)(b,(e=>e.current?.playerConfig.timelineItems||s),{memoizeOptions:{resultEqualityCheck:i.wU,maxSize:2}}),w=(0,r.P1)(b,(e=>e.current?.playerConfig.thumbnailItems||l),{memoizeOptions:{resultEqualityCheck:i.wU,maxSize:2}}),_=(0,r.P1)(m,a.F3,S,((e,t,n)=>e!==o.V.THUMBNAIL_EDITOR&&t&&void 0===n),{memoizeOptions:{resultEqualityCheck:i.wU,maxSize:2}}),T=e=>Boolean(e.sourceConfiguration.next),O=e=>{const t=E(e);return Boolean(t&&!t.withoutStatisticsTracking&&t.playerMode===o.V.NORMAL)}},5641:(e,t,n)=>{"use strict";n.d(t,{$G:()=>R,A9:()=>b,AI:()=>T,BN:()=>g,D0:()=>o,ET:()=>h,Gq:()=>k,H8:()=>B,K:()=>s,Pj:()=>i,Sp:()=>I,Vt:()=>O,Wn:()=>y,YF:()=>x,Zu:()=>m,_9:()=>p,as:()=>u,b3:()=>v,cX:()=>D,fY:()=>_,gp:()=>S,hz:()=>l,kT:()=>E,ni:()=>A,u7:()=>L,wE:()=>N,wF:()=>w,wV:()=>P,x9:()=>c,yj:()=>C,zJ:()=>a,ze:()=>d});var r=n(2145);const i=(0,r.createStandardAction)("videoState/CHANGE_CONTROLS")(),o=(0,r.createStandardAction)("videoState/REQUEST_PLAY")(),a=(0,r.createStandardAction)("videoState/PLAY_REQUESTED")(),s=(0,r.createStandardAction)("videoState/VIDEO_PLAY_STARTED")(),l=(0,r.createStandardAction)("videoState/PAUSE_REQUESTED")(),u=(0,r.createStandardAction)("videoState/SET_PLAY_PAUSE_SILENT_MODE")(),c=(0,r.createStandardAction)("videoState/VIDEO_PAUSED")(),d=(0,r.createStandardAction)("videoState/SEEK_REQUESTED")(),h=(0,r.createStandardAction)("videoState/TOGGLE_MUTE")(),p=(0,r.createStandardAction)("videoState/TOGGLE_PLAY_PAUSE")(),m=(0,r.createStandardAction)("videoState/VIDEO_SEEK_STARTED")(),g=(0,r.createStandardAction)("videoState/VIDEO_SEEKED")(),v=(0,r.createStandardAction)("videoState/TIME_UPDATED")(),y=(0,r.createStandardAction)("videoState/PLAY_ENDED")(),b=(0,r.createStandardAction)("videoState/VOLUME_CHANGE_REQUESTED")(),E=(0,r.createStandardAction)("videoState/QUALITY_CHANGE_REQUESTED")(),S=(0,r.createStandardAction)("videoState/QUALITY_CHANGED")(),A=(0,r.createStandardAction)("videoState/VOLUME_CHANGED")(),w=(0,r.createStandardAction)("videoState/VIDEO_READY")(),_=(0,r.createStandardAction)("videoState/AUTOPLAY_REQUESTED")(),T=(0,r.createStandardAction)("videoState/VIDEO_BUFFER_REQUESTED")(),O=(0,r.createStandardAction)("videoState/VIDEO_BUFFERED")(),I=(0,r.createStandardAction)("videoState/REQUEST_SEEK_AND_BUFFER")(),x=(0,r.createStandardAction)("videoState/REQUEST_SPEED_CHANGE")(),C=(0,r.createStandardAction)("videoState/SPEED_CHANGED")(),k=(0,r.createStandardAction)("videoState/PERCENTS_LOADED_CHANGED")(),R=(0,r.createStandardAction)("videoState/REGISTER_VIDEO_API")(),L=(0,r.createStandardAction)("videoState/REGISTER_PLAYER_EXTERNAL_API")(),N=(0,r.createStandardAction)("videoState/GET_SPEED_OPTIONS")(),P=(0,r.createStandardAction)("videoState/GET_QUALITY_OPTIONS")(),D=(0,r.createStandardAction)("videoState/SET_BOT_DETECTED")(),B=(0,r.createStandardAction)("videoState/SET_AUTOPLAY")()},5742:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>a,F3:()=>m,F7:()=>g,FC:()=>s,Gd:()=>y,L6:()=>i,SN:()=>r,TG:()=>b,Ut:()=>c,Xn:()=>d,aH:()=>p,ht:()=>h,u_:()=>o,xI:()=>v,yf:()=>u,zP:()=>l});const r=e=>e.videoState.isPlayBlockedBySideEffect,i=e=>e.videoState.isVideoReady,o=e=>e.videoState.muted,a=e=>e.videoState.quality,s=e=>e.videoState.volume,l=e=>e.videoState.speed,u=e=>e.videoState,c=e=>e.videoState.paused,d=e=>e.videoState.currentTime,h=e=>!e.videoState.paused&&!e.videoState.isEnded,p=e=>e.videoState.isPlayRequested,m=e=>e.videoState.hasStarted,g=e=>!e.thumbnail.isVisible||e.videoState.hasStarted&&!e.videoState.isEnded,v=e=>e.videoState.isEnded,y=e=>e.videoState.wasEnded,b=e=>e.videoState.isBotDetected},9999:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});const r="NOT_SPECIFIED"},9288:(e,t,n)=>{"use strict";n.d(t,{a:()=>Loader});var r=n(2784),i=n(8298),o=n(2322);const a=(0,i.F4)(["from{stroke-dashoffset:0;}to{stroke-dashoffset:442;}"]),s=i.ZP.path.withConfig({displayName:"LoadingIndicator__AnimatedPath",componentId:"sc-19esus6-0"})(["stroke-dasharray:145 76 145 76;stroke-dashoffset:0;animation:"," 2s linear infinite;animation-delay:",";"],a,(e=>e.animationDelay)),l=({color:e="var(--azure-500)",className:t,withBackground:n})=>{const i=(0,r.useCallback)((e=>{("undefined"!=typeof window?window:void 0)&&e&&(e.style.animation=`${a.getName()} 2s linear infinite`,e.style.animationDelay=(window.voomlyGlobalLoaderStart||(window.voomlyGlobalLoaderStart=performance.now()),`-${((performance.now()-window.voomlyGlobalLoaderStart)%2e3/1e3).toFixed(2)}s`))}),[]);return(0,o.jsx)("div",{className:t,style:{boxSizing:"border-box",position:"relative",display:"block",maxWidth:"min(calc(100% - 20px), 128px)",maxHeight:"min(calc(100% - 20px), 128px)",aspectRatio:1,margin:"10px",color:e||"var(--azure-500)",...n?{padding:"min(40px, 15%)",borderRadius:"9999px",background:"rgba(255, 255, 255, 0.3)"}:{}},children:(0,o.jsx)("svg",{"data-cy":"loadingIndicator-styledLoaderSVG",xmlns:"http://www.w3.org/2000/svg",viewBox:"-15 0 82 80",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",style:{display:"block",maxWidth:"48px",maxHeight:"48px",width:"100%",height:"100%"},children:(0,o.jsx)(s,{ref:i,className:"voomly-loader-path",d:"M100,140v68l57-34-57-34Z",transform:"translate(-94-134)",fill:"none",stroke:e,strokeWidth:"10",strokeLinecap:"round",strokeLinejoin:"round"})})})};class Loader extends r.PureComponent{constructor(e){super(e),this.timeoutHandle=void 0,this.state={isShowing:void 0===e.delay}}componentDidMount(){const{delay:e}=this.props;void 0!==e&&(this.timeoutHandle=window.setTimeout((()=>{this.setState({isShowing:!0})}),e))}componentWillUnmount(){this.timeoutHandle&&window.clearTimeout(this.timeoutHandle)}render(){const{className:e,color:t="#008EFF",screenCenter:n,blockCenter:r,isVisible:i=!0,withBackground:a=!0}=this.props,{isShowing:s}=this.state;return s?(0,o.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0",flex:"1",width:"100%",height:"100%",pointerEvents:"none",...n?{position:"fixed",top:"50%",left:"50%"}:{},...r?{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}:{},...a?{background:"linear-gradient(45deg, #8e96a4 0%, #c9d0de 100%)",borderRadius:"10px"}:{}},className:e,children:i&&(0,o.jsx)(l,{withBackground:!0,color:t})}):null}}},9993:(e,t,n)=>{"use strict";n.d(t,{d:()=>b});var r=n(2784),i=n(3344),o=n(3744),a=n(2779),s=n.n(a),l=n(8298),u=n(2037);const{CancelToken:c}=i.default;class RequestCancellation{constructor(){this.lastAttempt=void 0}cancelPreviousRequest(){this.lastAttempt&&(this.lastAttempt.cancel(),this.lastAttempt=void 0)}getCancelToken(){return this.lastAttempt=c.source(),this.lastAttempt.token}isCancel(e){return i.default.isCancel(e)}}const d={40:40,80:80,320:320,640:640,720:720,1280:1280,1920:1920,3840:3840};const h=(e,t,n)=>{const r=(e=>{const t=e.split(".").pop();if(t)return`.${t}`})(e),i=((e,t)=>function(e,t){let n;return e.every(((r,i)=>{const o=e[i+1];return o?t===r?(n=r,!1):!(t>r&&t<=o&&(n=o,1)):(n=r,!1)})),n}(Object.values(d).filter((e=>e<=t)),e))(t,n),o=2*i<=n;if(""===e)return void console.error("Invalid url, should not be empty",e);if(!r)return void console.error("Invalid url, no extension",e);if(-1===e.indexOf("original"))return void console.error("Invalid url, no original",e);const a=e.replace("original",`${i}/thumb%401x`),s=a.replace(r,".webp"),l=e.replace("original",`${i}/thumb%402x`),u=l.replace(r,".webp");return{original:e,x1:a,x2:o?l:void 0,x1_webp:s,x2_webp:o?u:void 0}};var p=n(2322);const m=l.ZP.picture.withConfig({displayName:"OptimizedImage__StyledPicture",componentId:"sc-ci0hba-0"})(["display:block;&.fadeIn img{visibility:visible;opacity:1;animation:fadein 150ms ease-in;}&.disableFadeIn img{visibility:visible;opacity:1;animation:none;}img{visibility:hidden;opacity:0;width:100%;height:100%;object-fit:cover;}@keyframes fadein{from{opacity:0;}to{opacity:1;}}"]),g={},v=({className:e,alt:t,url:n,size:a,onLoad:s,onError:l})=>{const c=(e=>h(e,40,40)?.x1||e)(n),[d,v]=(e=>{const[t,n]=(0,r.useState)(!1),[a,s]=(0,r.useState)(g[e]);return(0,r.useEffect)((()=>{g[e]&&s(g[e])}),[e]),(0,r.useEffect)((()=>{if(g[e])return;const t=new RequestCancellation;return(async()=>{const[r,a]=await(0,o.Z)(i.default.get(e,{cancelToken:t.getCancelToken(),transformRequest:(e,t)=>(delete t["tenant-id"],e)}));r&&(console.log("HTTP-Error: "+a?.status),n(!0));const l=a?.headers["x-amz-meta-original-image-size"];if(l){const[t]=l.split("x").map(Number);s(t),g[e]=t}else n(!0)})(),()=>{t.cancelPreviousRequest()}}),[e]),(0,r.useMemo)((()=>[a,t]),[a,t])})(c),[y,{width:b}]=(0,u.Z)(),E=(0,r.useMemo)((()=>d?((e,t,n)=>t&&e?h(e,t,n):void 0)(n,"auto"===a?b:a,d):void 0),[a,b,d,n]);return(0,p.jsxs)(m,{className:e,ref:y,children:[E&&!v?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("source",{srcSet:[`${E?.x1_webp} 1x`,E?.x2_webp?`${E?.x2_webp} 2x`:void 0].filter((e=>e)).join(", "),type:"image/webp"}),(0,p.jsx)("img",{onLoad:s,onError:l,src:E?.x1,alt:t,srcSet:E?.x2?`${E?.x2} 2x`:void 0})]}):null,!E&&v?(0,p.jsx)("img",{onLoad:s,onError:l,src:n,alt:t}):null]})},y=({className:e,url:t,alt:n,onLoad:r,onError:i})=>(0,p.jsx)(m,{className:e,children:(0,p.jsx)("img",{onLoad:r,onError:i,src:t,alt:n})}),b=(0,r.memo)((({disableFadeIn:e,onLoad:t,...n})=>{const[i,o]=(0,r.useState)(!1),a=(0,r.useCallback)((e=>{o(!0),t?.(e)}),[t]),l=n.url.endsWith(".svg"),u=s()(n.className,{fadeIn:i,disableFadeIn:e});return l?(0,p.jsx)(y,{...n,className:u,onLoad:a}):(0,p.jsx)(v,{...n,className:u,onLoad:a})}))},7894:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var r=n(2784),i=n(8298),o=n(2322);const a=i.ZP.div.withConfig({displayName:"RatioWrapper__StyledRatioDiv",componentId:"sc-1f09huu-0"})(["@supports not (aspect-ratio:","){width:100%;padding-top:",";}"],(e=>e.$ratio),(e=>{return(t=e.$ratio)?"auto"===t?"0":100/t+"%":"0";var t})),s=(0,r.forwardRef)((({ratio:e,children:t,className:n},r)=>(0,o.jsx)(a,{style:{aspectRatio:e,position:"relative",margin:"0 auto",maxHeight:"100%"},ref:r,className:n,$ratio:e,children:(0,o.jsx)("div",{style:{position:"absolute",inset:"0",margin:"auto",width:"100%",height:"100%",textAlign:"center"},children:t})})))},6709:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(2784);const i=(e,t)=>{const n=(()=>{const e=(0,r.useRef)(!1);return(0,r.useEffect)((()=>(e.current=!0,function(){e.current=!1})),[]),(0,r.useCallback)((()=>e.current),[])})(),[i,o]=(0,r.useState)({}),[a,s]=(0,r.useState)(e),l=(0,r.useRef)(e),[u,c]=(0,r.useState)(!1),d=(0,r.useCallback)(((e,t)=>o((n=>({...n,[e]:t})))),[]),h=(0,r.useCallback)((()=>{o({})}),[]),p=(0,r.useCallback)(((e,t)=>s((n=>{const r={...n,[e]:t};return l.current=r,r}))),[]),m=(0,r.useCallback)((()=>{s((()=>(l.current=e,e)))}),[e]),g=(0,r.useRef)(t);(0,r.useEffect)((()=>{g.current=t}),[t]);const v=(0,r.useCallback)((async e=>{try{e.preventDefault(),h(),c(!0),await g.current({values:l.current,setError:d,resetFields:m})}finally{n()&&c(!1)}}),[h,m,d,n]);return{values:a,setError:d,errors:i,resetErrors:h,isSubmitting:u,setIsSubmitting:c,setValue:p,handleSubmit:v}}},7129:(e,t,n)=>{"use strict";n.d(t,{b:()=>g});var r=n(8586),i=n(947),o=n(5503),a=n(4336),s=n(5872),l=n(7094),u=n(6645),c=n(9941),d=Object.prototype.hasOwnProperty;const h=function(e){if(null==e)return!0;if((0,s.Z)(e)&&((0,a.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,l.Z)(e)||(0,c.Z)(e)||(0,o.Z)(e)))return!e.length;var t=(0,i.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,u.Z)(e))return!(0,r.Z)(e).length;for(var n in e)if(d.call(e,n))return!1;return!0};var p=n(9126),m=n.n(p);const g=(e,t={})=>{let n=e?"/"===e.substring(0,1)?e:`/${e}`:"";"/"===n.substring(n.length-1,n.length)&&(console.error("New APIGateway does not allow having trailing `/`! We stripped it for you, but fix your code"),n=n.substring(0,n.length-1));const r=`https://api.voomly.com${n}`;return h(t)?r:`${r}?${m().stringify(t)}`}},8610:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});const r=(e=0,t=e,n=!1)=>{let r=Math.floor(e%60),i=Math.floor(e/60%60),o=Math.floor(e/3600),a=Math.floor(1e3*e%1e3);const s=Math.floor(t/60%60),l=Math.floor(t/3600),u=Math.floor(1e3*t%1e3);return(isNaN(e)||e===1/0)&&(o="-",i="-",r="-",a="-"),o=o>0||l>0?`${o}:`:"",i=`${(o||s>=10)&&i<10?`0${i}`:i}:`,r=r<10?`0${r}`:r,a=u>=0&&0===a?"000":u>=0&&a<10?`00${a}`:u>=0&&a<100?`0${a}`:`${a}`,o+i+r+(n?`.${a}`:"")}},5049:(e,t,n)=>{"use strict";function r(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function i(e,t){return e.require(t)}n.d(t,{l$:()=>i,KV:()=>r}),e=n.hmd(e)},8271:(e,t,n)=>{"use strict";n.d(t,{ph:()=>c,yW:()=>u});var r=n(5049),i=n(1959);e=n.hmd(e);const o=(0,i.Rf)(),a={nowSeconds:()=>Date.now()/1e3};const s=(0,r.KV)()?function(){try{return(0,r.l$)(e,"perf_hooks").performance}catch(t){return}}():function(){const{performance:e}=o;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),l=void 0===s?a:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},u=a.nowSeconds.bind(a),c=l.nowSeconds.bind(l);let d;(()=>{const{performance:e}=o;if(!e||!e.now)return void(d="none");const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i{"use strict";function r(e){return e&&e.Math==Math?e:void 0}n.d(t,{Rf:()=>o,YO:()=>a,n2:()=>i});const i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function o(){return i}function a(e,t,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}},6480:(e,t,n)=>{"use strict";var r=n(3729),i=n(8520),o=n(815),a=n(3263);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(r);const u={initialized:!1,init:e=>{u.whitelabelName=e,u.initialized||(l.default.addPlugin(o.whitelabelPlugin),l.default.addPlugin(i.expirePlugin)),u.initialized=!0},getItem:(e,t)=>l.default.get(e,t||null,{whiteLabelKey:u.getWhitelabelKeyOrNothing()}),setItem:(e,t,n)=>{const r=(null==n?void 0:n.ttl)&&(new Date).getTime()+n.ttl;l.default.set(e,t,{whiteLabelKey:u.getWhitelabelKeyOrNothing(),expire:r})},removeItem:e=>{l.default.remove(e,{whiteLabelKey:u.getWhitelabelKeyOrNothing()})},getWhiteLabelKey:()=>`WL-${a.slugify(u.whitelabelName||"non-defined")}`,getWhitelabelKeyOrNothing:()=>u.whitelabelName&&u.getWhiteLabelKey()};t.appLocalStorage=u},8520:(e,t)=>{"use strict";const n="custom_expire_mixin";t.expirePlugin=function(){const e=this.createStore(this.storage,null,this._namespacePrefix+n);return{set:function(r,i,o,a){!this.hasNamespace(n)&&a.expire&&e.set(t(i,a.whiteLabelKey),a.expire);return r()},get:function(e,t,i,o={}){this.hasNamespace(n)||r.call(this,t,o);return e()},remove:function(r,i,o={}){this.hasNamespace(n)||e.remove(t(i,o.whiteLabelKey));return r()}};function t(e,t){return[t,e].filter(Boolean).join(".")}function r(n,r={}){const i=t(n,r.whiteLabelKey);if(e.get(i,Number.MAX_VALUE)<=(new Date).getTime()){if(r.whiteLabelKey){const e=this.raw.get(r.whiteLabelKey,{});delete e[n],this.raw.set(r.whiteLabelKey,e)}else this.raw.remove(n);e.remove(i)}}}},815:(e,t)=>{"use strict";t.whitelabelPlugin=function(){return{set:function(e,t,n,r={}){if(r.whiteLabelKey){const e=this.raw.get(r.whiteLabelKey,{});return this.raw.set(r.whiteLabelKey,Object.assign(Object.assign({},e),{[t]:n}),r)}return e()},get:function(e,t,n,r={}){var i,o;if(r.whiteLabelKey){return null!==(o=null!==(i=this.raw.get(r.whiteLabelKey,{})[t])&&void 0!==i?i:n)&&void 0!==o?o:null}return e()},remove:function(e,t,n={}){if(n.whiteLabelKey){const e=this.raw.get(n.whiteLabelKey,{});delete e[t],this.raw.set(n.whiteLabelKey,e)}return e()}}}},1994:(e,t)=>{"use strict";t.appNameToUrlCompatibleName=e=>{const t=e.match(/^(.*)-\d+-\d+-\d+.*$/);return(t?t[1]:e).toString().toLowerCase()}},7822:(e,t,n)=>{"use strict";var r=n(1994);t.checkIfWhiteLabel=(e,t)=>r.appNameToUrlCompatibleName(e)!==t},3511:(e,t,n)=>{"use strict";var r=n(1994),i=n(7822),o=n(3263),a=n(6480);r.appNameToUrlCompatibleName,i.checkIfWhiteLabel,o.slugify,t.A7=a.appLocalStorage},3263:(e,t)=>{"use strict";t.slugify=e=>e.toString().toLowerCase().normalize("NFD").trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")},3744:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e.then((function(e){return[null,e]})).catch((function(e){return t&&Object.assign(e,t),[e,void 0]}))}},3344:(e,t,n)=>{"use strict";n.d(t,{default:()=>Et});var r={};function i(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>pe,hasStandardBrowserWebWorkerEnv:()=>me,navigator:()=>he,origin:()=>ge});const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,s=(l=Object.create(null),e=>{const t=o.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const u=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:d}=Array,h=c("undefined");const p=u("ArrayBuffer");const m=c("string"),g=c("function"),v=c("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==s(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},E=u("Date"),S=u("File"),A=u("Blob"),w=u("FileList"),_=u("URLSearchParams"),[T,O,I,x]=["ReadableStream","Request","Response","Headers"].map(u);function C(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,L=e=>!h(e)&&e!==R;const N=(P="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>P&&e instanceof P);var P;const D=u("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=u("RegExp"),F=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};C(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)};const U=u("AsyncFunction"),H=(V="function"==typeof setImmediate,G=g(R.postMessage),V?setImmediate:G?(z=`axios@${Math.random()}`,X=[],R.addEventListener("message",(({source:e,data:t})=>{e===R&&t===z&&X.length&&X.shift()()}),!1),e=>{X.push(e),R.postMessage(z,"*")}):e=>setTimeout(e));var V,G,z,X;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(R):"undefined"!=typeof process&&process.nextTick||H,Q={isArray:d,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=s(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:m,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:T,isRequest:O,isResponse:I,isHeaders:x,isUndefined:h,isDate:E,isFile:S,isBlob:A,isRegExp:M,isFunction:g,isStream:e=>y(e)&&g(e.pipe),isURLSearchParams:_,isTypedArray:N,isFileList:w,forEach:C,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,i)=>{const o=t&&k(n,i)||i;b(n[o])&&b(r)?n[o]=e(n[o],r):b(r)?n[o]=e({},r):d(r)?n[o]=r.slice():n[o]=r};for(let i=0,o=arguments.length;i(C(t,((t,r)=>{n&&g(t)?e[r]=i(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],r&&!r(s,e,t)||l[s]||(t[s]=e[s],l[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:F,freezeMethods:e=>{F(e,((t,n)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];g(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:k,global:R,isContextDefined:L,isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=d(e)?[]:{};return C(e,((e,t)=>{const o=n(e,r+1);!h(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:U,isThenable:e=>e&&(y(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:H,asap:W};function q(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Q.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.status}}});const K=q.prototype,Y={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Y[e]={value:e}})),Object.defineProperties(q,Y),Object.defineProperty(K,"isAxiosError",{value:!0}),q.from=(e,t,n,r,i,o)=>{const a=Object.create(K);return Q.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),q.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Z=q;function J(e){return Q.isPlainObject(e)||Q.isArray(e)}function $(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map((function(e,t){return e=$(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const te=Q.toFlatObject(Q,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ne=function(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Q.isUndefined(t[e])}))).metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Q.isDate(e))return e.toISOString();if(!s&&Q.isBlob(e))throw new Z("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(e)||Q.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(Q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&function(e){return Q.isArray(e)&&!e.some(J)}(e)||(Q.isFileList(e)||Q.endsWith(n,"[]"))&&(s=Q.toArray(e)))return n=$(n),s.forEach((function(e,r){!Q.isUndefined(e)&&null!==e&&t.append(!0===a?ee([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!J(e)||(t.append(ee(i,n,o),l(e)),!1)}const c=[],d=Object.assign(te,{defaultVisitor:u,convertValue:l,isVisitable:J});if(!Q.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Q.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),Q.forEach(n,(function(n,o){!0===(!(Q.isUndefined(n)||null===n)&&i.call(t,n,Q.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),c.pop()}}(e),t};function re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ie(e,t){this._pairs=[],e&&ne(e,this,t)}const oe=ie.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ae=ie;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function le(e,t,n){if(!t)return e;const r=n&&n.encode||se;Q.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(o=i?i(t,n):Q.isURLSearchParams(t)?t.toString():new ae(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ue=class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},de={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!=typeof window&&"undefined"!=typeof document,he="object"==typeof navigator&&navigator||void 0,pe=fe&&(!he||["ReactNative","NativeScript","NS"].indexOf(he.product)<0),me="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ge=fe&&window.location.href||"http://localhost",ve={...r,...de};const ye=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;if(o=!o&&Q.isArray(r)?r.length:o,s)return Q.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&Q.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&Q.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Q.isObject(e);i&&Q.isHTMLForm(e)&&(e=new FormData(e));if(Q.isFormData(e))return r?JSON.stringify(ye(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new ve.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ve.isNode&&Q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Q.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(i){if(n){if("SyntaxError"===i.name)throw Z.from(i,Z.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));const Ee=be,Se=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ae=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function _e(e){return!1===e||null==e?e:Q.isArray(e)?e.map(_e):String(e)}function Te(e,t,n,r,i){return Q.isFunction(r)?r.call(this,t,n):(i&&(t=n),Q.isString(t)?Q.isString(r)?-1!==t.indexOf(r):Q.isRegExp(r)?r.test(t):void 0:void 0)}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=we(t);if(!i)throw new Error("header name must be a non-empty string");const o=Q.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=_e(e))}const o=(e,t)=>Q.forEach(e,((e,n)=>i(e,n,t)));if(Q.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Se[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Q.isHeaders(e))for(const[a,s]of e.entries())i(s,a,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=we(e)){const n=Q.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Q.isFunction(t))return t.call(this,e,n);if(Q.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=Q.findKey(this,e);return!(!n||void 0===this[n]||t&&!Te(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=we(e)){const i=Q.findKey(n,e);!i||t&&!Te(0,n[i],i,t)||(delete n[i],r=!0)}}return Q.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Te(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Q.forEach(this,((r,i)=>{const o=Q.findKey(n,i);if(o)return t[o]=_e(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=_e(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Q.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ae]=this[Ae]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(!function(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return Q.isArray(e)?e.forEach(r):r(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Q.freezeMethods(AxiosHeaders);const Oe=AxiosHeaders;function Ie(e,t){const n=this||Ee,r=t||n,i=Oe.from(r.headers);let o=r.data;return Q.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function xe(e){return!(!e||!e.__CANCEL__)}function Ce(e,t,n){Z.call(this,e??"canceled",Z.ERR_CANCELED,t,n),this.name="CanceledError"}Q.inherits(Ce,Z,{__CANCEL__:!0});const ke=Ce;function Re(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Le=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];i||(i=l),n[o]=s,r[o]=l;let c=a,d=0;for(;c!==o;)d+=n[c++],c%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i{i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),o-s)))},()=>n&&a(n)]},Pe=(e,t,n=3)=>{let r=0;const i=Le(50,250);return Ne((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,l=i(s);r=o;e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},De=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Be=e=>(...t)=>Q.asap((()=>e(...t))),Me=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Fe=ve.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];Q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Q.isString(r)&&a.push("path="+r),Q.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ue(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const je=e=>e instanceof Oe?{...e}:e;function He(e,t){t=t||{};const n={};function r(e,t,n,r){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:r},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function i(e,t,n,i){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function o(e,t){if(!Q.isUndefined(t))return r(void 0,t)}function a(e,t){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>i(je(e),je(t),0,!0)};return Q.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||i,a=o(e[r],t[r],r);Q.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Ve=e=>{const t=He({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Oe.from(s),t.url=le(Ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Q.isFormData(r))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ve.hasStandardBrowserEnv&&(i&&Q.isFunction(i)&&(i=i(t)),i||!1!==i&&Me(t.url))){const e=o&&a&&Fe.read(a);e&&s.set(o,e)}return t},Ge="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ve(e);let i=r.data;const o=Oe.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=r;function m(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let g=new XMLHttpRequest;function v(){if(!g)return;const r=Oe.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Re((function(e){t(e),m()}),(function(e){n(e),m()}),{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(n(new Z("Request aborted",Z.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new Z("Network Error",Z.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Z(t,i.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,g)),g=null},void 0===i&&o.setContentType(null),"setRequestHeader"in g&&Q.forEach(o.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),Q.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),p&&([l,c]=Pe(p,!0),g.addEventListener("progress",l)),h&&g.upload&&([s,u]=Pe(h),g.upload.addEventListener("progress",s),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{g&&(n(!t||t.type?new ke(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===ve.protocols.indexOf(y)?n(new Z("Unsupported protocol "+y+":",Z.ERR_BAD_REQUEST,e)):g.send(i||null)}))},ze=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Z?t:new ke(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new Z(`timeout ${t} of ms exceeded`,Z.ETIMEDOUT))}),t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;return s.unsubscribe=()=>Q.asap(a),s}},Xe=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of We(e))yield*Xe(n,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},qe="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ke=qe&&"function"==typeof ReadableStream,Ye=qe&&("function"==typeof TextEncoder?(Ze=new TextEncoder,e=>Ze.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ze;const Je=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},$e=Ke&&Je((()=>{let e=!1;const t=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),et=Ke&&Je((()=>Q.isReadableStream(new Response("").body))),tt={stream:et&&(e=>e.body)};var nt;qe&&(nt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!tt[e]&&(tt[e]=Q.isFunction(nt[e])?t=>t[e]():(t,n)=>{throw new Z(`Response type '${e}' is not supported`,Z.ERR_NOT_SUPPORT,n)})})));const rt=async(e,t)=>{const n=Q.toFiniteNumber(e.getContentLength());return n??(async e=>{if(null==e)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e)){const t=new Request(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Q.isArrayBufferView(e)||Q.isArrayBuffer(e)?e.byteLength:(Q.isURLSearchParams(e)&&(e+=""),Q.isString(e)?(await Ye(e)).byteLength:void 0)})(t)},it={http:null,xhr:Ge,fetch:qe&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:h}=Ve(e);u=u?(u+"").toLowerCase():"text";let p,m=ze([i,o&&o.toAbortSignal()],a);const g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let v;try{if(l&&$e&&"get"!==n&&"head"!==n&&0!==(v=await rt(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Q.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=De(v,Pe(Be(l)));r=Qe(n.body,65536,e,t)}}Q.isString(d)||(d=d?"include":"omit");const i="credentials"in Request.prototype;p=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:i?d:void 0});let o=await fetch(p);const a=et&&("stream"===u||"response"===u);if(et&&(s||a&&g)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Q.toFiniteNumber(o.headers.get("content-length")),[n,r]=s&&De(t,Pe(Be(s),!0))||[];o=new Response(Qe(o.body,65536,n,(()=>{r&&r(),g&&g()})),e)}u=u||"text";let y=await tt[Q.findKey(tt,u)||"text"](o,e);return!a&&g&&g(),await new Promise(((t,n)=>{Re(t,n,{data:y,headers:Oe.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:p})}))}catch(y){if(g&&g(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new Z("Network Error",Z.ERR_NETWORK,e,p),{cause:y.cause||y});throw Z.from(y,y&&y.code,e,p)}})};Q.forEach(it,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const ot=e=>`- ${e}`,at=e=>Q.isFunction(e)||null===e||!1===e,st=e=>{e=Q.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(ot).join("\n"):" "+ot(e[0]):"as no adapter specified";throw new Z("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function lt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function ut(e){lt(e),e.headers=Oe.from(e.headers),e.data=Ie.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return st(e.adapter||Ee.adapter)(e).then((function(t){return lt(e),t.data=Ie.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t}),(function(t){return xe(t)||(lt(e),t&&t.response&&(t.response.data=Ie.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)}))}const ct="1.8.4",dt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{dt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const ft={};dt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Z(r(i," has been removed"+(t?" in "+t:"")),Z.ERR_DEPRECATED);return t&&!ft[i]&&(ft[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}},dt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ht={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Z("option "+o+" must be "+n,Z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Z("Unknown option "+o,Z.ERR_BAD_OPTION)}},validators:dt},pt=ht.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=He(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&ht.assertOptions(n,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),null!=r&&(Q.isFunction(r)?t.paramsSerializer={serialize:r}:ht.assertOptions(r,{encode:pt.function,serialize:pt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ht.assertOptions(t,{baseUrl:pt.spelling("baseURL"),withXsrfToken:pt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Q.merge(i.common,i[t.method]);i&&Q.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Oe.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,d=0;if(!s){const e=[ut.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new ke(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new CancelToken((function(t){e=t})),cancel:e}}}const gt=CancelToken;const vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vt).forEach((([e,t])=>{vt[t]=e}));const yt=vt;const bt=function e(t){const n=new mt(t),r=i(mt.prototype.request,n);return Q.extend(r,mt.prototype,n,{allOwnKeys:!0}),Q.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(He(t,n))},r}(Ee);bt.Axios=mt,bt.CanceledError=ke,bt.CancelToken=gt,bt.isCancel=xe,bt.VERSION=ct,bt.toFormData=ne,bt.AxiosError=Z,bt.Cancel=bt.CanceledError,bt.all=function(e){return Promise.all(e)},bt.spread=function(e){return function(t){return e.apply(null,t)}},bt.isAxiosError=function(e){return Q.isObject(e)&&!0===e.isAxiosError},bt.mergeConfig=He,bt.AxiosHeaders=Oe,bt.formToJSON=e=>ye(Q.isHTMLForm(e)?new FormData(e):e),bt.getAdapter=st,bt.HttpStatusCode=yt,bt.default=bt;const Et=bt},2680:(e,t,n)=>{"use strict";var r=n(7286),i=n(9429),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},9429:(e,t,n)=>{"use strict";var r=n(4090),i=n(7286),o=n(7669),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(l,s),c=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(p){c=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=u(r,l,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return u(r,s,arguments)};c?c(e.exports,"apply",{value:h}):e.exports.apply=h},2779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{"use strict";var r=n(1181)(),i=n(7286),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(u){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),l=n(326);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],d=!!l&&l(e,t);if(o)o(e,t,{configurable:null===u&&d?d.configurable:!u,enumerable:null===r&&d?d.enumerable:!r,value:n,writable:null===i&&d?d.writable:!i});else{if(!c&&(r||i||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},161:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(7795);e.exports=Function.prototype.bind||r},7286:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(R){l=null}var u=function(){throw new a},c=l?function(){try{return u}catch(e){try{return l(arguments,"callee").get}catch(t){return u}}}():u,d=n(2636)(),h=n(8486)(),p=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),m={},g="undefined"!=typeof Uint8Array&&p?p(Uint8Array):r,v={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":m,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&p?p(p([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&p?p((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&p?p((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&p?p(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":c,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(p)try{null.error}catch(R){var y=p(p(R));v["%Error.prototype%"]=y}var b=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(n=p(i.prototype))}return v[t]=n,n},E={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=n(4090),A=n(2196),w=S.call(Function.call,Array.prototype.concat),_=S.call(Function.apply,Array.prototype.splice),T=S.call(Function.call,String.prototype.replace),O=S.call(Function.call,String.prototype.slice),I=S.call(Function.call,RegExp.prototype.exec),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,k=function(e,t){var n,r=e;if(A(E,r)&&(r="%"+(n=E[r])[0]+"%"),A(v,r)){var o=v[r];if(o===m&&(o=b(r)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=O(e,0,1),n=O(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return T(e,x,(function(e,t,n,i){r[r.length]=n?T(i,C,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=k("%"+r+"%",t),s=o.name,u=o.value,c=!1,d=o.alias;d&&(r=d[0],_(n,w([0,1],d)));for(var h=1,p=!0;h=n.length){var b=l(u,m);u=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[m]}else p=A(u,m),u=u[m];p&&!c&&(v[s]=u)}}return u}},326:(e,t,n)=>{"use strict";var r=n(7286)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(i){r=null}e.exports=r},1181:(e,t,n)=>{"use strict";var r=n(7286)("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},8486:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},2636:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(6679);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},6679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},2196:(e,t,n)=>{"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=n(4090);e.exports=o.call(r,i)},7655:e=>{!function t(n){e.exports=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var n=1;n"):O}function k(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rNumber.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=N.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={},r='"';for(P.lastIndex=0;null!==(t=P.exec(e));){var i=t[2];0===i.indexOf(r)&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),n[t[1].trim()]=i}return n},e}();function B(e){return"ID"!==e&&"CLASS"!==e&&"START-DATE"!==e&&"DURATION"!==e&&"END-DATE"!==e&&"END-ON-NEXT"!==e}function M(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}var F=function(){function e(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var n=t.attr;for(var r in n)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==n[r]){L.warn('DATERANGE tag attribute: "'+r+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=r;break}e=s(new D({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){var i=new Date(this.attr["END-DATE"]);A(i.getTime())&&(this._endDate=i)}}return o(e,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var e=this.attr.decimalFloatingPoint("DURATION");if(A(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&A(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),e}(),U=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},H={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"},V=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[H.AUDIO]=null,t[H.VIDEO]=null,t[H.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},o(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=S.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),G=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkeys=void 0,r.type=void 0,r.loader=null,r.keyLoader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new U,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.endList=void 0,r.gap=void 0,r.type=t,r}l(t,e);var n=t.prototype;return n.setKeyFormat=function(e){if(this.levelkeys){var t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}},n.abortRequests=function(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()},n.setElementaryStreamInfo=function(e,t,n,r,i,o){void 0===o&&(o=!1);var a=this.elementaryStreams,s=a[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):a[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:o}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[H.AUDIO]=null,e[H.VIDEO]=null,e[H.AUDIOVIDEO]=null},o(t,[{key:"decryptdata",get:function(){if(!this.levelkeys&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{var t=Object.keys(this.levelkeys);if(1===t.length)return this._decryptdata=this.levelkeys[t[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!A(this.programDateTime))return null;var e=A(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){var t=Object.keys(this.levelkeys),n=t.length;if(n>1||1===n&&this.levelkeys[t[0]].encrypted)return!0}return!1}}]),t}(V),z=function(e){function t(t,n,r,i,o){var a;(a=e.call(this,r)||this).fragOffset=0,a.duration=0,a.gap=!1,a.independent=!1,a.relurl=void 0,a.fragment=void 0,a.index=void 0,a.stats=new U,a.duration=t.decimalFloatingPoint("DURATION"),a.gap=t.bool("GAP"),a.independent=t.bool("INDEPENDENT"),a.relurl=t.enumeratedString("URI"),a.fragment=n,a.index=i;var s=t.enumeratedString("BYTERANGE");return s&&a.setByteRange(s,o),o&&(a.fragOffset=o.fragOffset+o.duration),a}return l(t,e),o(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(V),X=10,W=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},o(e,[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&A(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||X}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}(),Q=b(void 0);function q(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}var K,Y=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},Z=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},J=function(e,t){for(var n=t,r=0;Y(e,t);)r+=10,r+=$(e,t+6),Z(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},$=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},ee=function(e,t){return Y(e,t)&&$(e,t+6)+10<=e.length-t},te=function(e){for(var t=ie(e),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(o);break;case 12:case 13:a=e[c++],u+=String.fromCharCode((31&o)<<6|63&a);break;case 14:a=e[c++],s=e[c++],u+=String.fromCharCode((15&o)<<12|(63&a)<<6|(63&s)<<0)}}return u};function de(){return K||void 0===self.TextDecoder||(K=new self.TextDecoder("utf-8")),K}var fe={hexDump:function(e){for(var t="",n=0;n>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function Se(e,t){var n=[];if(!t.length)return n;for(var r=e.byteLength,i=0;i1?i+o:r;if(ge(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,a));else{var s=Se(e.subarray(i+8,a),t.slice(1));s.length&&pe.apply(n,s)}i=a}return n}function Ae(e){var t=[],n=e[0],r=8,i=ye(e,r);r+=4;var o=0,a=0;r+=0===n?8:16,r+=2;var s=e.length+a,l=ve(e,r);r+=2;for(var u=0;u>>31)return L.warn("SIDX has hierarchical references (not supported)"),null;var p=ye(e,c);c+=4,t.push({referenceSize:h,subsegmentDuration:p,info:{duration:p/i,start:s,end:s+h-1}}),s+=h,r=c+=4}return{earliestPresentationTime:o,timescale:i,version:n,referencesCount:l,references:t}}function we(e){for(var t=[],n=Se(e,["moov","trak"]),r=0;r0;i||(r=Se(t,["encv"])),r.forEach((function(e){Se(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=Te(e);if(t){var r=t.subarray(8,24);r.some((function(e){return 0!==e}))||(L.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+fe.hexDump(r)+" -> "+fe.hexDump(n)),t.set(n,8))}}))}))})),e}function Te(e){var t=Se(e,["schm"])[0];if(t){var n=ge(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return Se(e,["schi","tenc"])[0]}return L.error("[eme] missing 'schm' box"),null}function Oe(e,t){return Se(t,["moof","traf"]).reduce((function(t,n){var r=Se(n,["tfdt"])[0],i=r[0],o=Se(n,["tfhd"]).reduce((function(t,n){var o=ye(n,4),a=e[o];if(a){var s=ye(r,4);if(1===i){if(s===he)return L.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;s*=he+1,s+=ye(r,8)}var l=s/(a.timescale||9e4);if(isFinite(l)&&(null===t||l>1&63;return 39===n||40===n}return 6==(31&t)}function De(e,t,n,r){var i=Be(e),o=0;o+=t;for(var a=0,s=0,l=!1,u=0;o=i.length)break;a+=u=i[o++]}while(255===u);s=0;do{if(o>=i.length)break;s+=u=i[o++]}while(255===u);var c=i.length-o;if(!l&&4===a&&o16){for(var E=[],S=0;S<16;S++){var A=i[o++].toString(16);E.push(1==A.length?"0"+A:A),3!==S&&5!==S&&7!==S&&9!==S||E.push("-")}for(var w=s-16,_=new Uint8Array(w),T=0;Tc)break}}function Be(e){for(var t=e.byteLength,n=[],r=1;r>8*(15-n)&255;return t}function je(){if("undefined"!=typeof self)return self.MediaSource||self.WebKitMediaSource}var He={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},Ve=je();function Ge(e,t){var n=He[t];return!!n&&!0===n[e.slice(0,4)]}function ze(e,t){var n;return null!=(n=null==Ve?void 0:Ve.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"'))&&n}var Xe=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,We=/#EXT-X-MEDIA:(.*)/g,Qe=/^#EXT(?:INF|-X-TARGETDURATION):/m,qe=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Ke=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),Ye=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).slice(-4)}return e},e.resolve=function(e,t){return S.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.isMediaPlaylist=function(e){return Qe.test(e)},e.parseMasterPlaylist=function(t,n){var r,i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:!1},o=[];for(Xe.lastIndex=0;null!=(r=Xe.exec(t));)if(r[1]){var a,s=new D(r[1]),l=r[2],u={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(l,n)},c=s.decimalResolution("RESOLUTION");c&&(u.width=c.width,u.height=c.height),$e((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),u),u.videoCodec&&-1!==u.videoCodec.indexOf("avc1")&&(u.videoCodec=e.convertAVC1ToAVCOTI(u.videoCodec)),null!=(a=u.unknownCodecs)&&a.length||o.push(u),i.levels.push(u)}else if(r[3]){var d=r[3],h=r[4];switch(d){case"SESSION-DATA":var p=new D(h),m=p["DATA-ID"];m&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[m]=p);break;case"SESSION-KEY":var g=Ze(h,n);g.encrypted&&g.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(g)):L.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+h+'"');break;case"DEFINE":break;case"CONTENT-STEERING":var v=new D(h);i.contentSteering={uri:e.resolve(v["SERVER-URI"],n),pathwayId:v["PATHWAY-ID"]||"."};break;case"START":i.startTimeOffset=Je(h)}}var y=o.length>0&&o.length0&&X.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=X.optionalFloat("PART-HOLD-BACK",0),c.holdBack=X.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Q=new D(x);c.partTarget=Q.decimalFloatingPoint("PART-TARGET");break;case"PART":var q=c.partList;q||(q=c.partList=[]);var K=m>0?q[q.length-1]:void 0,Y=m++,Z=new D(x),J=new z(Z,b,t,Y,K);q.push(J),b.duration+=J.duration;break;case"PRELOAD-HINT":var $=new D(x);c.preloadHint=$;break;case"RENDITION-REPORT":var ee=new D(x);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ee);break;default:L.warn("line parsed but not handled: "+a)}}}y&&!y.relurl?(d.pop(),g-=y.duration,c.partList&&(c.fragmentHint=y)):c.partList&&(nt(b,y),b.cc=v,c.fragmentHint=b,u&&it(b,u,c));var te=d.length,ne=d[0],re=d[te-1];if((g+=c.skippedSegments*c.targetduration)>0&&te&&re){c.averagetargetduration=g/te;var ie=re.sn;c.endSN="initSegment"!==ie?ie:0,c.live||(re.endList=!0),ne&&(c.startCC=ne.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(g+=c.fragmentHint.duration),c.totalduration=g,c.endCC=v,E>0&&tt(d,E),c},e}();function Ze(e,t,n){var r,i,o=new D(e),a=null!=(r=o.METHOD)?r:"",s=o.URI,l=o.hexadecimalInteger("IV"),u=o.KEYFORMATVERSIONS,c=null!=(i=o.KEYFORMAT)?i:"identity";s&&o.IV&&!l&&L.error("Invalid IV: "+o.IV);var d=s?Ye.resolve(s,t):"",h=(u||"1").split("/").map(Number).filter(Number.isFinite);return new Fe(a,d,c,h,l)}function Je(e){var t=new D(e).decimalFloatingPoint("TIME-OFFSET");return A(t)?t:null}function $e(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Ge(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function et(e,t,n){var r=t[n];r&&(e[n]=r)}function tt(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}function nt(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),A(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function rt(e,t,n,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function it(e,t,n){e.levelkeys=t;var r=n.encryptedFragments;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some((function(e){return t[e].isCommonEncryption}))||r.push(e)}var ot={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},at={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function st(e){switch(e.type){case ot.AUDIO_TRACK:return at.AUDIO;case ot.SUBTITLE_TRACK:return at.SUBTITLE;default:return at.MAIN}}function lt(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var ut=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.LEVEL_LOADING,this.onLevelLoading,this),e.on(w.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(w.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.LEVEL_LOADING,this.onLevelLoading,this),e.off(w.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(w.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ot.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,o=t.deliveryDirectives;this.load({id:n,level:r,responseType:"text",type:ot.LEVEL,url:i,deliveryDirectives:o})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,o=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:ot.AUDIO_TRACK,url:i,deliveryDirectives:o})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,o=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:ot.SUBTITLE_TRACK,url:i,deliveryDirectives:o})},t.load=function(e){var t,n,r,i=this,o=this.hls.config,a=this.getInternalLoader(e);if(a){var l=a.context;if(l&&l.url===e.url)return void L.trace("[playlist-loader]: playlist request ongoing");L.log("[playlist-loader]: aborting previous loader for type: "+e.type),a.abort()}if(n=e.type===ot.MANIFEST?o.manifestLoadPolicy.default:s({},o.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),a=this.createInternalLoader(e),null!=(t=e.deliveryDirectives)&&t.part&&(e.type===ot.LEVEL&&null!==e.level?r=this.hls.levels[e.level].details:e.type===ot.AUDIO_TRACK&&null!==e.id?r=this.hls.audioTracks[e.id].details:e.type===ot.SUBTITLE_TRACK&&null!==e.id&&(r=this.hls.subtitleTracks[e.id].details),r)){var u=r.partTarget,c=r.targetduration;if(u&&c){var d=1e3*Math.max(3*u,.8*c);n=s({},n,{maxTimeToFirstByteMs:Math.min(d,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(d,n.maxTimeToFirstByteMs)})}}var h=n.errorRetry||n.timeoutRetry||{},p={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:h.maxNumRetry||0,retryDelay:h.retryDelayMs||0,maxRetryDelay:h.maxRetryDelayMs||0},m={onSuccess:function(e,t,n,r){var o=i.getInternalLoader(n);i.resetInternalLoader(n.type);var a=e.data;0===a.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),Ye.isMediaPlaylist(a)?i.handleTrackOrLevelPlaylist(e,t,n,r||null,o):i.handleMasterPlaylist(e,t,n,r)):i.handleManifestParsingError(e,n,new Error("no EXTM3U delimiter"),r||null,t)},onError:function(e,t,n,r){i.handleNetworkError(t,n,!1,e,r)},onTimeout:function(e,t,n){i.handleNetworkError(t,n,!0,void 0,e)}};a.load(e,p,m)},t.handleMasterPlaylist=function(e,t,n,r){var i=this.hls,o=e.data,a=lt(e,n),s=Ye.parseMasterPlaylist(o,a);if(s.playlistParsingError)this.handleManifestParsingError(e,n,s.playlistParsingError,r,t);else{var l=s.contentSteering,u=s.levels,c=s.sessionData,d=s.sessionKeys,h=s.startTimeOffset,p=s.variableList;this.variableList=p;var m=Ye.parseMasterPlaylistMedia(o,a,s),g=m.AUDIO,v=void 0===g?[]:g,y=m.SUBTITLES,b=m["CLOSED-CAPTIONS"];v.length&&(v.some((function(e){return!e.url}))||!u[0].audioCodec||u[0].attrs.AUDIO||(L.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new D({}),bitrate:0,url:""}))),i.trigger(w.MANIFEST_LOADED,{levels:u,audioTracks:v,subtitles:y,captions:b,contentSteering:l,url:a,stats:t,networkDetails:r,sessionData:c,sessionKeys:d,startTimeOffset:h,variableList:p})}},t.handleTrackOrLevelPlaylist=function(e,t,n,r,i){var o=this.hls,a=n.id,s=n.level,l=n.type,u=lt(e,n),c=A(a)?a:0,d=A(s)?s:c,h=st(n),p=Ye.parseLevelPlaylist(e.data,u,d,h,c,this.variableList);if(l===ot.MANIFEST){var m={attrs:new D({}),bitrate:0,details:p,name:"",url:u};o.trigger(w.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:u,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=p,this.handlePlaylistLoaded(p,e,t,n,r,i)},t.handleManifestParsingError=function(e,t,n,r,i){this.hls.trigger(w.ERROR,{type:_.NETWORK_ERROR,details:T.MANIFEST_PARSING_ERROR,fatal:t.type===ot.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})},t.handleNetworkError=function(e,t,n,i,o){void 0===n&&(n=!1);var a="A network "+(n?"timeout":"error"+(i?" (status "+i.code+")":""))+" occurred while loading "+e.type;e.type===ot.LEVEL?a+=": "+e.level+" id: "+e.id:e.type!==ot.AUDIO_TRACK&&e.type!==ot.SUBTITLE_TRACK||(a+=" id: "+e.id+' group-id: "'+e.groupId+'"');var s=new Error(a);L.warn("[playlist-loader]: "+a);var l=T.UNKNOWN,u=!1,c=this.getInternalLoader(e);switch(e.type){case ot.MANIFEST:l=n?T.MANIFEST_LOAD_TIMEOUT:T.MANIFEST_LOAD_ERROR,u=!0;break;case ot.LEVEL:l=n?T.LEVEL_LOAD_TIMEOUT:T.LEVEL_LOAD_ERROR,u=!1;break;case ot.AUDIO_TRACK:l=n?T.AUDIO_TRACK_LOAD_TIMEOUT:T.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case ot.SUBTITLE_TRACK:l=n?T.SUBTITLE_TRACK_LOAD_TIMEOUT:T.SUBTITLE_LOAD_ERROR,u=!1}c&&this.resetInternalLoader(e.type);var d={type:_.NETWORK_ERROR,details:l,fatal:u,url:e.url,loader:c,context:e,error:s,networkDetails:t,stats:o};if(i){var h=(null==t?void 0:t.url)||e.url;d.response=r({url:h,data:void 0},i)}this.hls.trigger(w.ERROR,d)},t.handlePlaylistLoaded=function(e,t,n,r,i,o){var a=this.hls,s=r.type,l=r.level,u=r.id,c=r.groupId,d=r.deliveryDirectives,h=lt(t,r),p=st(r),m="number"==typeof r.level&&p===at.MAIN?l:void 0;if(e.fragments.length){e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));var g=e.playlistParsingError;if(g)a.trigger(w.ERROR,{type:_.NETWORK_ERROR,details:T.LEVEL_PARSING_ERROR,fatal:!1,url:h,error:g,reason:g.message,response:t,context:r,level:m,parent:p,networkDetails:i,stats:n});else switch(e.live&&o&&(o.getCacheAge&&(e.ageHeader=o.getCacheAge()||0),o.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),s){case ot.MANIFEST:case ot.LEVEL:a.trigger(w.LEVEL_LOADED,{details:e,level:m||0,id:u||0,stats:n,networkDetails:i,deliveryDirectives:d});break;case ot.AUDIO_TRACK:a.trigger(w.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:c||"",stats:n,networkDetails:i,deliveryDirectives:d});break;case ot.SUBTITLE_TRACK:a.trigger(w.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:c||"",stats:n,networkDetails:i,deliveryDirectives:d})}}else{var v=new Error("No Segments found in Playlist");a.trigger(w.ERROR,{type:_.NETWORK_ERROR,details:T.LEVEL_EMPTY_ERROR,fatal:!1,url:h,error:v,reason:v.message,response:t,context:r,level:m,parent:p,networkDetails:i,stats:n})}},e}();function ct(e,t){var n;try{n=new Event("addtrack")}catch(r){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function dt(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function ft(e,t,n,r){var i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var o=pt(e.cues,t,n),a=0;ae[n].endTime)return-1;for(var r=0,i=n;r<=i;){var o=Math.floor((i+r)/2);if(te[o].startTime&&r-1)for(var o=i,a=e.length;o=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}var mt={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"},gt=.25;function vt(){if("undefined"!=typeof self)return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var yt=function(){var e=vt();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(t){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function bt(e,t){return e.getTime()/1e3-t}function Et(e){return Uint8Array.from(e.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var St=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},t._registerListeners=function(){var e=this.hls;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(dt(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},t.onManifestLoading=function(){this.dateRangeCuesAppended={}},t.createTrack=function(e){var t=this.getID3Track(e.textTracks);return t.mode="hidden",t},t.getID3Track=function(e){if(this.media){for(var t=0;tyt&&(d=yt),d-c<=0&&(d=c+gt);for(var h=0;ht.startDate&&e.push(r),e}),[]).sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}))[0];m&&(c=bt(m.startDate,h),l=!0)}for(var v=Object.keys(t.attr),y=0;y.05&&this.forwardBufferLength>1){var u=Math.min(2,Math.max(1,o)),c=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(u,Math.max(1,c))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},t.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},t.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},o(e,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,o=i.liveSyncDuration,a=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,u=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==o?o:a*r);var c=r,d=1;return u+Math.min(this.stallCount*d,c)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,o=r-n.totalduration,a=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(o,i),a)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}}]),e}(),wt=["NONE","TYPE-0","TYPE-1",null],_t={No:"",Yes:"YES",v2:"v2"};function Tt(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,i=e.endSN;return n&&(void 0!==t?t-i:0)e.sn?(i=n-e.start,r=e):(i=e.start-n,r=t),r.duration!==i&&(r.duration=i)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function Ct(e,t,n,r,i,o){r-n<=0&&(L.warn("Fragment should have a positive duration",t),r=n+t.duration,o=i+t.duration);var a=n,s=r,l=t.startPTS,u=t.endPTS;if(A(l)){var c=Math.abs(l-n);A(t.deltaPTS)?t.deltaPTS=Math.max(c,t.deltaPTS):t.deltaPTS=c,a=Math.max(n,l),n=Math.min(n,l),i=Math.min(i,t.startDTS),s=Math.min(r,u),r=Math.max(r,u),o=Math.max(o,t.endDTS)}var d=n-t.start;0!==t.start&&(t.start=n),t.duration=r-t.start,t.startPTS=n,t.maxStartPTS=a,t.startDTS=i,t.endPTS=r,t.minEndPTS=s,t.endDTS=o;var h,p=t.sn;if(!e||pe.endSN)return 0;var m=p-e.startSN,g=e.fragments;for(g[m]=t,h=m;h>0;h--)xt(g[h],g[h-1]);for(h=m;h=0;i--){var o=r[i].initSegment;if(o){n=o;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var a,s=0;if(Nt(e,t,(function(e,r){e.relurl&&(s=e.cc-r.cc),A(e.startPTS)&&A(e.endPTS)&&(r.start=r.startPTS=e.startPTS,r.startDTS=e.startDTS,r.maxStartPTS=e.maxStartPTS,r.endPTS=e.endPTS,r.endDTS=e.endDTS,r.minEndPTS=e.minEndPTS,r.duration=e.endPTS-e.startPTS,r.duration&&(a=r),t.PTSKnown=t.alignedSliding=!0),r.elementaryStreams=e.elementaryStreams,r.loader=e.loader,r.stats=e.stats,r.urlId=e.urlId,e.initSegment&&(r.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null==(t=n)?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed){L.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=t.skippedSegments;l--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=Rt(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));var u=t.fragments;if(s){L.warn("discontinuity sliding from playlist, take drift into account");for(var c=0;c=r.length||Dt(t,r[n].start)}function Dt(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;rt){var o=1e3*r[r.length-1].duration;o499)}var Wt={search:function(e,t){for(var n=0,r=e.length-1,i=null,o=null;n<=r;){var a=t(o=e[i=(n+r)/2|0]);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}};function Qt(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!A(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;re)return 0;var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function Yt(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function Zt(e,t){return Wt.search(e,(function(e){return e.cct?-1:0}))}var Jt=3e5,$t={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},en={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4},tn=function(){function e(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=L.log.bind(L,"[info]:"),this.warn=L.warn.bind(L,"[warning]:"),this.error=L.error.bind(L,"[error]:"),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(w.ERROR,this.onError,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this)},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(w.ERROR,this.onError,this),e.off(w.ERROR,this.onErrorOut,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this))},t.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},t.startLoad=function(e){this.playlistError=0},t.stopLoad=function(){},t.getVariantLevelIndex=function(e){return(null==e?void 0:e.type)===at.MAIN?e.level:this.hls.loadLevel},t.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},t.onLevelUpdated=function(){this.playlistError=0},t.onError=function(e,t){var n;if(!t.fatal){var r=this.hls,i=t.context;switch(t.details){case T.FRAG_LOAD_ERROR:case T.FRAG_LOAD_TIMEOUT:case T.KEY_LOAD_ERROR:case T.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case T.FRAG_GAP:case T.FRAG_PARSING_ERROR:case T.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=$t.SendAlternateToPenaltyBox);case T.LEVEL_EMPTY_ERROR:case T.LEVEL_PARSING_ERROR:var o,a,s=t.parent===at.MAIN?t.level:r.loadLevel;return void(t.details===T.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(a=o.levelDetails)&&a.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,s)));case T.LEVEL_LOAD_ERROR:case T.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==i?void 0:i.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level)));case T.AUDIO_TRACK_LOAD_ERROR:case T.AUDIO_TRACK_LOAD_TIMEOUT:case T.SUBTITLE_LOAD_ERROR:case T.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){var l=r.levels[r.loadLevel];if(l&&(i.type===ot.AUDIO_TRACK&&i.groupId===l.audioGroupId||i.type===ot.SUBTITLE_TRACK&&i.groupId===l.textGroupId))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=$t.SendAlternateToPenaltyBox,void(t.errorAction.flags=en.MoveAllAlternatesMatchingHost)}return;case T.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var u=r.levels[r.loadLevel],c=null==u?void 0:u.attrs["HDCP-LEVEL"];return void(c&&(t.errorAction={action:$t.SendAlternateToPenaltyBox,flags:en.MoveAllAlternatesMatchingHDCP,hdcpLevel:c}));case T.BUFFER_ADD_CODEC_ERROR:case T.REMUX_ALLOC_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(n=t.level)?n:r.loadLevel));case T.INTERNAL_EXCEPTION:case T.BUFFER_APPENDING_ERROR:case T.BUFFER_APPEND_ERROR:case T.BUFFER_FULL_ERROR:case T.LEVEL_SWITCH_ERROR:case T.BUFFER_STALLED_ERROR:case T.BUFFER_SEEK_OVER_HOLE:case T.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:$t.DoNothing,flags:en.None})}if(t.type===_.KEY_SYSTEM_ERROR){var d=this.getVariantLevelIndex(t.frag);return t.levelRetry=!1,void(t.errorAction=this.getLevelSwitchAction(t,d))}}},t.getPlaylistRetryOrSwitchAction=function(e,t){var n,r=Ht(this.hls.config.playlistLoadPolicy,e),i=this.playlistError++,o=null==(n=e.response)?void 0:n.code;if(zt(r,i,jt(e),o))return{action:$t.RetryRequest,flags:en.None,retryConfig:r,retryCount:i};var a=this.getLevelSwitchAction(e,t);return r&&(a.retryConfig=r,a.retryCount=i),a},t.getFragRetryOrSwitchAction=function(e){var t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],i=t.config,o=i.fragLoadPolicy,a=i.keyLoadPolicy,s=Ht(e.details.startsWith("key")?a:o,e),l=t.levels.reduce((function(e,t){return e+t.fragmentError}),0);if(r){var u;e.details!==T.FRAG_GAP&&r.fragmentError++;var c=null==(u=e.response)?void 0:u.code;if(zt(s,l,jt(e),c))return{action:$t.RetryRequest,flags:en.None,retryConfig:s,retryCount:l}}var d=this.getLevelSwitchAction(e,n);return s&&(d.retryConfig=s,d.retryCount=l),d},t.getLevelSwitchAction=function(e,t){var n=this.hls;null==t&&(t=n.loadLevel);var r=this.hls.levels[t];if(r&&(r.loadError++,n.autoLevelEnabled)){for(var i,o,a=-1,s=n.levels,l=n.loadLevel,u=n.minAutoLevel,c=n.maxAutoLevel,d=null==(i=e.frag)?void 0:i.type,h=null!=(o=e.context)?o:{},p=h.type,m=h.groupId,g=s.length;g--;){var v=(g+l)%s.length;if(v!==l&&v>=u&&v<=c&&0===s[v].loadError){var y=s[v];if(e.details===T.FRAG_GAP&&e.frag){var b=s[v].details;if(b){var E=qt(e.frag,b.fragments,e.frag.start);if(null!=E&&E.gap)continue}}else{if(p===ot.AUDIO_TRACK&&m===y.audioGroupId||p===ot.SUBTITLE_TRACK&&m===y.textGroupId)continue;if(d===at.AUDIO&&r.audioGroupId===y.audioGroupId||d===at.SUBTITLE&&r.textGroupId===y.textGroupId)continue}a=v;break}}if(a>-1&&n.loadLevel!==a)return e.levelRetry=!0,this.playlistError=0,{action:$t.SendAlternateToPenaltyBox,flags:en.None,nextAutoLevel:a}}return{action:$t.SendAlternateToPenaltyBox,flags:en.MoveAllAlternatesMatchingHost}},t.onErrorOut=function(e,t){var n;switch(null==(n=t.errorAction)?void 0:n.action){case $t.DoNothing:break;case $t.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===T.FRAG_GAP||(t.fatal=!0)}t.fatal&&this.hls.stopLoad()},t.sendAlternateToPenaltyBox=function(e){var t=this.hls,n=e.errorAction;if(n){var r=n.flags,i=n.hdcpLevel,o=n.nextAutoLevel;switch(r){case en.None:this.switchLevel(e,o);break;case en.MoveAllAlternatesMatchingHost:n.resolved||(n.resolved=this.redundantFailover(e));break;case en.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=wt[wt.indexOf(i)-1],n.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+t.maxHdcpLevel+'" or lower')}n.resolved||this.switchLevel(e,o)}},t.switchLevel=function(e,t){void 0!==t&&e.errorAction&&(this.warn("switching to level "+t+" after "+e.details),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)},t.redundantFailover=function(e){var t=this,n=this.hls,r=this.penalizedRenditions,i=e.parent===at.MAIN?e.level:n.loadLevel,o=n.levels[i],a=o.url.length,s=e.frag?e.frag.urlId:o.urlId;o.urlId!==s||e.frag&&!o.details||this.penalizeRendition(o,e);for(var l=function(){var l=(s+u)%a,c=r[l];if(!c||nn(c,e,r[s]))return t.warn("Switching to Redundant Stream "+(l+1)+"/"+a+': "'+o.url[l]+'" after '+e.details),t.playlistError=0,n.levels.forEach((function(e){e.urlId=l})),n.nextLoadLevel=i,{v:!0}},u=1;uJt)return!0;var r=e.details;if(t.details===T.FRAG_GAP&&r&&t.frag){var i=t.frag.start,o=qt(null,r.fragments,i);if(o&&!o.gap)return!0}if(n&&e.errors.length3*r.targetduration)return!0}return!1}var rn,on=function(e){function t(t,n){var r;return(r=e.call(this,t,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevel=null,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.steering=void 0,r.onParsedComplete=void 0,r.steering=n,r._registerListeners(),r}l(t,e);var n=t.prototype;return n._registerListeners=function(){var e=this.hls;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(w.LEVEL_LOADED,this.onLevelLoaded,this),e.on(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(w.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(w.FRAG_LOADED,this.onFragLoaded,this),e.on(w.ERROR,this.onError,this)},n._unregisterListeners=function(){var e=this.hls;e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(w.LEVEL_LOADED,this.onLevelLoaded,this),e.off(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(w.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(w.FRAG_LOADED,this.onFragLoaded,this),e.off(w.ERROR,this.onError,this)},n.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),e.prototype.destroy.call(this)},n.startLoad=function(){this._levels.forEach((function(e){e.loadError=0,e.fragmentError=0})),e.prototype.startLoad.call(this)},n.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]},n.onManifestLoading=function(e,t){this.resetLevels()},n.onManifestLoaded=function(e,t){var n,r=[],i={};t.levels.forEach((function(e){var t,o=e.attrs;-1!==(null==(t=e.audioCodec)?void 0:t.indexOf("mp4a.40.34"))&&(rn||(rn=/chrome|firefox/i.test(navigator.userAgent)),rn&&(e.audioCodec=void 0));var a=o.AUDIO,s=o.CODECS,l=o["FRAME-RATE"];o["PATHWAY-ID"];var u=o.RESOLUTION,c=o.SUBTITLES,d=e.bitrate+"-"+u+"-"+l+"-"+s;(n=i[d])?n.addFallback(e):(n=new It(e),i[d]=n,r.push(n)),an(n,"audio",a),an(n,"text",c)})),this.filterAndSortMediaOptions(r,t)},n.filterAndSortMediaOptions=function(e,t){var n=this,r=[],i=[],o=!1,a=!1,s=!1,l=e.filter((function(e){var t=e.audioCodec,n=e.videoCodec,r=e.width,i=e.height,l=e.unknownCodecs;return o||(o=!(!r||!i)),a||(a=!!n),s||(s=!!t),!(null!=l&&l.length)&&(!t||ze(t,"audio"))&&(!n||ze(n,"video"))}));if((o||a)&&s&&(l=l.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),0!==l.length){t.audioTracks&&sn(r=t.audioTracks.filter((function(e){return!e.audioCodec||ze(e.audioCodec,"audio")}))),t.subtitles&&sn(i=t.subtitles);var u=l.slice(0);l.sort((function(e,t){return e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs["FRAME-RATE"]!==t.attrs["FRAME-RATE"]?e.attrs.decimalFloatingPoint("FRAME-RATE")-t.attrs.decimalFloatingPoint("FRAME-RATE"):e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):o&&e.height!==t.height?e.height-t.height:0}));var c=u[0];if(this.steering&&(l=this.steering.filterParsedLevels(l)).length!==u.length)for(var d=0;d1&&void 0!==t?(i.url=i.url.filter(r),i.audioGroupIds&&(i.audioGroupIds=i.audioGroupIds.filter(r)),i.textGroupIds&&(i.textGroupIds=i.textGroupIds.filter(r)),i.urlId=0,!0):(n.steering&&n.steering.removeLevel(i),!1))}));this.hls.trigger(w.LEVELS_UPDATED,{levels:i})},n.onLevelsUpdated=function(e,t){var n=t.levels;n.forEach((function(e,t){var n=e.details;null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t}))})),this._levels=n},o(t,[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;if(0!==t.length){if(e<0||e>=t.length){var n=new Error("invalid level idx"),r=e<0;if(this.hls.trigger(w.ERROR,{type:_.OTHER_ERROR,details:T.LEVEL_SWITCH_ERROR,level:e,fatal:r,error:n,reason:n.message}),r)return;e=Math.min(e,t.length-1)}var i=this.currentLevelIndex,o=this.currentLevel,a=o?o.attrs["PATHWAY-ID"]:void 0,l=t[e],u=l.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=l,i!==e||!l.details||!o||a!==u){this.log("Switching to level "+e+(u?" with Pathway "+u:"")+" from level "+i+(a?" with Pathway "+a:""));var c=s({},l,{level:e,maxBitrate:l.maxBitrate,attrs:l.attrs,uri:l.uri,urlId:l.urlId});delete c._attrs,delete c._urlId,this.hls.trigger(w.LEVEL_SWITCHING,c);var d=l.details;if(!d||d.live){var h=this.switchParams(l.uri,null==o?void 0:o.details);this.loadPlaylist(h)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}]),t}(function(){function e(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=L.log.bind(L,t+":"),this.warn=L.warn.bind(L,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var n=null==t?void 0:t.renditionReports;if(n){for(var r=-1,i=0;i=0&&c>t.partTarget&&(u+=1)}return new Ot(l,u>=0?u:void 0,_t.No)}}},t.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},t.shouldLoadPlaylist=function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)},t.shouldReloadPlaylist=function(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,a=self.performance.now(),s=o.loading.first?Math.max(0,a-o.loading.first):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&kt(n,i),!this.canLoad||!i.live)return;var l,u=void 0,c=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,h=i.lastPartSn,p=i.endSN,m=i.lastPartIndex,g=h===p;-1!==m?(u=g?p+1:h,c=g?d?0:m:m+1):u=p+1;var v=i.age,y=v+i.ageHeader,b=Math.min(y-i.partTarget,1.5*i.targetduration);if(b>0){if(n&&b>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+b+" with playlist age: "+i.age),b=0;else{var E=Math.floor(b/i.targetduration);u+=E,void 0!==c&&(c+=Math.round(b%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+v.toFixed(2)+"s goal: "+b+" skip sn "+E+" to part "+c)}i.tuneInGoal=b}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,u,c),d||!g)return void this.loadPlaylist(l)}else i.canBlockReload&&(l=this.getDeliveryDirectives(i,t.deliveryDirectives,u,c));var S=this.hls.mainForwardBufferInfo,A=S?S.end-S.len:0,w=Bt(i,1e3*(i.edge-A));i.updated&&a>this.requestScheduled+w&&(this.requestScheduled=o.loading.start),void 0!==u&&i.canBlockReload?this.requestScheduled=o.loading.first+w-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+w=u.maxNumRetry)return!1;if(r&&null!=(d=e.context)&&d.deliveryDirectives)this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+n+'" without delivery-directives'),this.loadPlaylist();else{var h=Vt(u,l);this.timer=self.setTimeout((function(){return t.loadPlaylist()}),h),this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+n+'" in '+h+"ms")}e.levelRetry=!0,i.resolved=!0}return c},e}());function an(e,t,n){n&&("audio"===t?(e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds[e.url.length-1]=n):"text"===t&&(e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds[e.url.length-1]=n))}function sn(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}var ln={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},un=function(){function e(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(w.BUFFER_APPENDED,this.onBufferAppended,this),e.on(w.FRAG_BUFFERED,this.onFragBuffered,this),e.on(w.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(w.BUFFER_APPENDED,this.onBufferAppended,this),e.off(w.FRAG_BUFFERED,this.onFragBuffered,this),e.off(w.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){var n=this.activePartLists[t];if(n)for(var r=n.length;r--;){var i=n[r];if(!i)break;var o=i.end;if(i.start<=e&&null!==o&&e<=o)return i}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var o=n[r[i]];if((null==o?void 0:o.body.type)===t&&o.buffered){var a=o.body;if(a.start<=e&&e<=a.end)return a}}return null},t.detectEvictedFragments=function(e,t,n,r){var i=this;this.timeRanges&&(this.timeRanges[e]=t);var o=(null==r?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach((function(r){var a=i.fragments[r];if(a&&!(o>=a.body.sn))if(a.buffered||a.loaded){var s=a.range[e];s&&s.time.some((function(e){var n=!i.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&i.removeFragment(a.body),n}))}else a.body.type===n&&i.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var o=dn(r),a=this.fragments[o];if(a){var s=!r.relurl;Object.keys(n).forEach((function(e){var o=r.elementaryStreams[e];if(o){var l=n[e],u=s||!0===o.partial;a.range[e]=t.getBufferedTimes(r,i,u,l)}})),a.loaded=null,Object.keys(a.range).length?(a.buffered=!0,a.body.endList&&(this.endListFragments[a.body.type]=a),cn(a)||this.removeParts(r.sn-1,r.type)):this.removeFragment(a.body)}}},t.removeParts=function(e,t){var n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter((function(t){return t.fragment.sn>=e})))},t.fragBuffered=function(e,t){var n=dn(e),r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},o=e.start,a=e.end,s=e.minEndPTS||a,l=e.maxStartPTS||o,u=0;u=c&&s<=d){i.time.push({startPTS:Math.max(o,r.start(u)),endPTS:Math.min(a,r.end(u))});break}if(oc)i.partial=!0,i.time.push({startPTS:Math.max(o,r.start(u)),endPTS:Math.min(a,r.end(u))});else if(a<=c)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,o=0,a=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach((function(l){var u=s[l];u&&cn(u)&&(n=u.body.start-a,r=u.body.end+a,e>=n&&e<=r&&(t=Math.min(e-n,r-e),o<=t&&(i=u.body,o=t)))})),i},t.isEndListAppended=function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||cn(t))},t.getState=function(e){var t=dn(e),n=this.fragments[t];return n?n.buffered?cn(n)?ln.PARTIAL:ln.OK:ln.APPENDING:ln.NOT_LOADED},t.isTimeBuffered=function(e,t,n){for(var r,i,o=0;o=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest){var i=r?null:t,o=dn(n);this.fragments[o]={body:n,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if("initSegment"!==r.sn){var a=r.type;if(i){var s=this.activePartLists[a];s||(this.activePartLists[a]=s=[]),s.push(i)}this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];n.detectEvictedFragments(e,t,a,i)}))}},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=dn(e);return!!this.fragments[t]},t.hasParts=function(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)},t.removeFragmentsInRange=function(e,t,n,r,i){var o=this;r&&!this.hasGaps||Object.keys(this.fragments).forEach((function(a){var s=o.fragments[a];if(s){var l=s.body;l.type!==n||r&&!l.gap||l.starte&&(s.buffered||i)&&o.removeFragment(l)}}))},t.removeFragment=function(e){var t=dn(e);e.stats.loaded=0,e.clearElementaryStreamInfo();var n=this.activePartLists[e.type];if(n){var r=e.sn;this.activePartLists[e.type]=n.filter((function(e){return e.fragment.sn!==r}))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1},e}();function cn(e){var t,n,r;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(n=e.range.audio)?void 0:n.partial)||(null==(r=e.range.audiovideo)?void 0:r.partial))}function dn(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}var fn=Math.pow(2,17),hn=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,i=e.url;if(!i)return Promise.reject(new gn({type:_.NETWORK_ERROR,details:T.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(l,u){if(n.loader&&n.loader.destroy(),e.gap)u(mn(e));else{var c=n.loader=e.loader=a?new a(o):new s(o),d=pn(e),h=Gt(o.fragLoadPolicy.default),p={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:fn};e.stats=c.stats,c.load(d,p,{onSuccess:function(t,r,i,o){n.resetLoader(e,c);var a=t.data;i.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(a.slice(0,16)),a=a.slice(16)),l({frag:e,part:null,payload:a,networkDetails:o})},onError:function(t,o,a,s){n.resetLoader(e,c),u(new gn({type:_.NETWORK_ERROR,details:T.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:r({url:i,data:void 0},t),error:new Error("HTTP Error "+t.code+" "+t.text),networkDetails:a,stats:s}))},onAbort:function(t,r,i){n.resetLoader(e,c),u(new gn({type:_.NETWORK_ERROR,details:T.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:i,stats:t}))},onTimeout:function(t,r,i){n.resetLoader(e,c),u(new gn({type:_.NETWORK_ERROR,details:T.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error("Timeout after "+p.timeout+"ms"),networkDetails:i,stats:t}))},onProgress:function(n,r,i,o){t&&t({frag:e,part:null,payload:i,networkDetails:o})}})}}))},t.loadPart=function(e,t,n){var i=this;this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(l,u){if(i.loader&&i.loader.destroy(),e.gap||t.gap)u(mn(e,t));else{var c=i.loader=e.loader=a?new a(o):new s(o),d=pn(e,t),h=Gt(o.fragLoadPolicy.default),p={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:fn};t.stats=c.stats,c.load(d,p,{onSuccess:function(r,o,a,s){i.resetLoader(e,c),i.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:r.data,networkDetails:s};n(u),l(u)},onError:function(n,o,a,s){i.resetLoader(e,c),u(new gn({type:_.NETWORK_ERROR,details:T.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r({url:d.url,data:void 0},n),error:new Error("HTTP Error "+n.code+" "+n.text),networkDetails:a,stats:s}))},onAbort:function(n,r,o){e.stats.aborted=t.stats.aborted,i.resetLoader(e,c),u(new gn({type:_.NETWORK_ERROR,details:T.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:o,stats:n}))},onTimeout:function(n,r,o){i.resetLoader(e,c),u(new gn({type:_.NETWORK_ERROR,details:T.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error("Timeout after "+p.timeout+"ms"),networkDetails:o,stats:n}))}})}}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var o=Math.round(e.duration/t.duration),a=Math.min(Math.round(n.loaded/i),o),s=(o-a)*Math.round(n.loaded/a);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,u=r.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function pn(e,t){void 0===t&&(t=null);var n=t||e,r={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},i=n.byteRangeStartOffset,o=n.byteRangeEndOffset;if(A(i)&&A(o)){var a,s=i,l=o;if("initSegment"===e.sn&&"AES-128"===(null==(a=e.decryptdata)?void 0:a.method)){var u=o-i;u%16&&(l=o+(16-u%16)),0!==i&&(r.resetIV=!0,s=i-16)}r.rangeStart=s,r.rangeEnd=l}return r}function mn(e,t){var n=new Error("GAP "+(e.gap?"tag":"attribute")+" found"),r={type:_.MEDIA_ERROR,details:T.FRAG_GAP,fatal:!1,frag:e,error:n,networkDetails:null};return t&&(r.part=t),(t||e).stats.aborted=!0,new gn(r)}var gn=function(e){function t(t){var n;return(n=e.call(this,t.error.message)||this).data=void 0,n.data=t,n}return l(t,e),t}(m(Error)),vn=function(){function e(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}var t=e.prototype;return t.abort=function(e){for(var t in this.keyUriToKeyInfo){var n=this.keyUriToKeyInfo[t].loader;if(n){if(e&&e!==n.context.frag.type)return;n.abort()}}},t.detach=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}},t.destroy=function(){for(var e in this.detach(),this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}},t.createKeyLoadError=function(e,t,n,r,i){return void 0===t&&(t=T.KEY_LOAD_ERROR),new gn({type:_.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})},t.loadClear=function(e,t){var n=this;if(this.emeController&&this.config.emeEnabled)for(var r=e.sn,i=e.cc,o=function(){var e=t[a];if(i<=e.cc&&("initSegment"===r||"initSegment"===e.sn||r1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}(),bn={length:0,start:function(){return 0},end:function(){return 0}},En=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(o){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,o=e.getBuffered(t),a=[];for(i=0;ia&&(r[o-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,d=0;d=h&&tn.startCC||e&&e.cc>>8^255&v^99,e[p]=v,t[v]=p;var y=h[p],b=h[y],E=h[b],S=257*h[v]^16843008*v;r[p]=S<<24|S>>>8,i[p]=S<<16|S>>>16,o[p]=S<<8|S>>>24,a[p]=S,S=16843009*E^65537*b^257*y^16843008*p,l[v]=S<<24|S>>>8,u[v]=S<<16|S>>>16,c[v]=S<<8|S>>>24,d[v]=S,p?(p=y^h[h[h[E^y]]],m^=h[h[m]]):p=m=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;ra.end){var c=o>u;(o0&&o&&o.key&&o.iv&&"AES-128"===o.method){var a=self.performance.now();return n.decrypter.decrypt(new Uint8Array(i),o.key.buffer,o.iv.buffer).catch((function(t){throw r.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((function(n){var i=self.performance.now();return r.trigger(w.FRAG_DECRYPTED,{frag:e,payload:n,stats:{tstart:a,tdecrypt:i}}),t.payload=n,t}))}return t})).then((function(r){var i=n.fragCurrent,o=n.hls;if(!n.levels)throw new Error("init load aborted, missing levels");var a=e.stats;n.state=Fn.IDLE,t.fragmentError=0,e.data=new Uint8Array(r.payload),a.parsing.start=a.buffering.start=self.performance.now(),a.parsing.end=a.buffering.end=self.performance.now(),r.frag===i&&o.trigger(w.FRAG_BUFFERED,{stats:a,frag:i,part:null,id:e.type}),n.tick()})).catch((function(t){n.state!==Fn.STOPPED&&n.state!==Fn.ERROR&&(n.warn(t),n.resetFragmentLoading(e))}))},n.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},n.fragBufferedComplete=function(e,t){var n,r,i,o,a=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+(this.playlistType===at.MAIN?"level":"track")+" "+e.level+" (frag:["+(null!=(n=e.startPTS)?n:NaN).toFixed(3)+"-"+(null!=(r=e.endPTS)?r:NaN).toFixed(3)+"] > buffer:"+(a?Mn.toString(En.getBuffered(a)):"(detached)")+")"),this.state=Fn.IDLE,a&&(!this.loadedmetadata&&e.type==at.MAIN&&a.buffered.length&&(null==(i=this.fragCurrent)?void 0:i.sn)===(null==(o=this.fragPrevious)?void 0:o.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},n.seekToStartPos=function(){},n._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,o=!i||0===i.length||i.some((function(e){return!e})),a=new Sn(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!o);t.flush(a)}},n._handleFragmentLoadProgress=function(e){},n._doFragLoad=function(e,t,n,r){var i,o=this;void 0===n&&(n=null);var a=null==t?void 0:t.details;if(!this.levels||!a)throw new Error("frag load aborted, missing level"+(a?"":" detail")+"s");var s=null;if(!e.encrypted||null!=(i=e.decryptdata)&&i.key?!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments):(this.log("Loading key for "+e.sn+" of ["+a.startSN+"-"+a.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=Fn.KEY_LOADING,this.fragCurrent=e,s=this.keyLoader.load(e).then((function(e){if(!o.fragContextChanged(e.frag))return o.hls.trigger(w.KEY_LOADED,e),o.state===Fn.KEY_LOADING&&(o.state=Fn.IDLE),e})),this.hls.trigger(w.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(s=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){var l=a.partList;if(l&&r){n>e.end&&a.fragmentHint&&(e=a.fragmentHint);var u=this.getNextPart(l,e,n);if(u>-1){var c,d=l[u];return this.log("Loading part sn: "+e.sn+" p: "+d.index+" cc: "+e.cc+" of playlist ["+a.startSN+"-"+a.endSN+"] parts [0-"+u+"-"+(l.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=d.start+d.duration,this.state=Fn.FRAG_LOADING,c=s?s.then((function(n){return!n||o.fragContextChanged(n.frag)?null:o.doFragPartsLoad(e,d,t,r)})).catch((function(e){return o.handleFragLoadError(e)})):this.doFragPartsLoad(e,d,t,r).catch((function(e){return o.handleFragLoadError(e)})),this.hls.trigger(w.FRAG_LOADING,{frag:e,part:d,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):c}if(!e.url||this.loadedEndOfParts(l,n))return Promise.resolve(null)}}this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(a?"of ["+a.startSN+"-"+a.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),A(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Fn.FRAG_LOADING;var h,p=this.config.progressive;return h=p&&s?s.then((function(t){return!t||o.fragContextChanged(null==t?void 0:t.frag)?null:o.fragmentLoader.load(e,r)})).catch((function(e){return o.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,p?r:void 0),s]).then((function(e){var t=e[0];return!p&&t&&r&&r(t),t})).catch((function(e){return o.handleFragLoadError(e)})),this.hls.trigger(w.FRAG_LOADING,{frag:e,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):h},n.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(o,a){var s,l=[],u=null==(s=n.details)?void 0:s.partList;!function t(s){i.fragmentLoader.loadPart(e,s,r).then((function(r){l[s.index]=r;var a=r.part;i.hls.trigger(w.FRAG_LOADED,r);var c=Ft(n,e.sn,s.index+1)||Ut(u,e.sn,s.index+1);if(!c)return o({frag:e,part:a,partsLoaded:l});t(c)})).catch(a)}(t)}))},n.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===T.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(w.ERROR,t)}else this.hls.trigger(w.ERROR,{type:_.OTHER_ERROR,details:T.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null},n._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===Fn.PARSING){var n=t.frag,r=t.part,i=t.level,o=self.performance.now();n.stats.parsing.end=o,r&&(r.stats.parsing.end=o),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||this.state===Fn.STOPPED||this.state===Fn.ERROR||(this.state=Fn.IDLE)},n.getCurrentContext=function(e){var t=this.levels,n=this.fragCurrent,r=e.level,i=e.sn,o=e.part;if(null==t||!t[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var a=t[r],s=o>-1?Ft(a,i,o):null,l=s?s.fragment:Mt(a,i,n);return l?(n&&n!==l&&(l.stats=n.stats),{frag:l,part:s,level:a}):null},n.bufferFragmentData=function(e,t,n,r){var i;if(e&&this.state===Fn.PARSING){var o=e.data1,a=e.data2,s=o;if(o&&a&&(s=Re(o,a)),null!=(i=s)&&i.length){var l={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:s};this.hls.trigger(w.BUFFER_APPENDING,l),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},n.flushBufferGap=function(e){var t=this.media;if(t)if(En.isBuffered(t,t.currentTime)){var n=t.currentTime,r=En.bufferInfo(t,n,0),i=e.duration,o=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),a=Math.max(Math.min(e.start-o,r.end-o),n+o);e.start-a>o&&this.flushMainBuffer(a,e.start)}else this.flushMainBuffer(0,e.start)},n.getFwdBufferInfo=function(e,t){var n=this.getLoadPosition();return A(n)?this.getFwdBufferInfoAtPos(e,n,t):null},n.getFwdBufferInfoAtPos=function(e,t,n){var r=this.config.maxBufferHole,i=En.bufferInfo(e,t,r);if(0===i.len&&void 0!==i.nextStart){var o=this.fragmentTracker.getBufferedFrag(t,n);if(o&&i.nextStart=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},n.getAppendedFrag=function(e,t){var n=this.fragmentTracker.getAppendedFrag(e,at.MAIN);return n&&"fragment"in n?n.fragment:n},n.getNextFragment=function(e,t){var n=t.fragments,r=n.length;if(!r)return null;var i,o=this.config,a=n[0].start;if(t.live){var s=o.initialLiveManifestSize;if(rt},n.getNextFragmentLoopLoading=function(e,t,n,r,i){var o=e.gap,a=this.getNextFragment(this.nextLoadPosition,t);if(null===a)return a;if(e=a,o&&e&&!e.gap&&n.nextStart){var s=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r);if(null!==s&&n.len+s.len>=i)return this.log('buffer full after gaps in "'+r+'" playlist starting at sn: '+e.sn),null}return e},n.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},n.getNextPart=function(e,t,n){for(var r=-1,i=!1,o=!0,a=0,s=e.length;a-1&&nn.start&&n.loaded},n.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Qt(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var o=t[i-e.startSN];n.cc===o.cc&&(r=o,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Zt(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var a=this.hls.liveSyncPosition;null!==a&&(r=this.getFragmentAtPosition(a,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},n.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,a=n.fragments,s=n.endSN,l=n.fragmentHint,u=i.maxFragLookUpTolerance,c=n.partList,d=!!(i.lowLatencyMode&&null!=c&&c.length&&l);if(d&&l&&!this.bitrateTest&&(a=a.concat(l),s=l.sn),r=et-u?0:u):a[a.length-1]){var h=r.sn-n.startSN,p=this.fragmentTracker.getState(r);if((p===ln.OK||p===ln.PARTIAL&&r.gap)&&(o=r),o&&r.sn===o.sn&&(!d||c[0].fragment.sn>r.sn)&&o&&r.level===o.level){var m=a[h+1];r=r.sn=o-t.maxFragLookUpTolerance&&i<=a;if(null!==r&&n.duration>r&&(i"+e.startSN+" prev-sn: "+(i?i.sn:"na")+" fragments: "+a),c}return s},n.waitForCdnTuneIn=function(e){var t=3;return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*t)},n.setStartPosition=function(e,t){var n=this.startPosition;if(n "+(null==(i=this.fragCurrent)?void 0:i.url))}else{var o=t.details===T.FRAG_GAP;o&&this.fragmentTracker.fragBuffered(r,!0);var a=t.errorAction,s=a||{},l=s.action,u=s.retryCount,c=void 0===u?0:u,d=s.retryConfig;if(a&&l===$t.RetryRequest&&d){var h;this.resetStartWhenNotLoaded(null!=(h=this.levelLastLoaded)?h:r.level);var p=Vt(d,c);this.warn("Fragment "+r.sn+" of "+e+" "+r.level+" errored with "+t.details+", retrying loading "+(c+1)+"/"+d.maxNumRetry+" in "+p+"ms"),a.resolved=!0,this.retryDate=self.performance.now()+p,this.state=Fn.FRAG_LOADING_WAITING_RETRY}else d&&a?(this.resetFragmentErrors(e),c.5;r&&this.reduceMaxBufferLength(n.len);var i=!r;return i&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+t+" buffer"),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),i}return!1},n.resetFragmentErrors=function(e){e===at.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Fn.STOPPED&&(this.state=Fn.IDLE)},n.afterBufferFlushed=function(e,t,n){if(e){var r=En.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Fn.ENDED&&this.resetLoadingState()}},n.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Fn.IDLE},n.resetStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=this.levels?this.levels[e].details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},n.resetWhenMissingContext=function(e){var t;this.warn("The loading context changed while buffering fragment "+e.sn+" of level "+e.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(null!=(t=this.levelLastLoaded)?t:e.level),this.resetLoadingState()},n.removeUnbufferedFrags=function(e){void 0===e&&(e=0),this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)},n.updateLevelTiming=function(e,t,n,r){var i,o=this,a=n.details;if(a){if(Object.keys(e.elementaryStreams).reduce((function(t,i){var s=e.elementaryStreams[i];if(s){var l=s.endPTS-s.startPTS;if(l<=0)return o.warn("Could not parse fragment "+e.sn+" "+i+" duration reliably ("+l+")"),t||!1;var u=r?0:Ct(a,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return o.hls.trigger(w.LEVEL_PTS_UPDATED,{details:a,level:n,drift:u,type:i,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t}),!1))n.fragmentError=0;else if(null===(null==(i=this.transmuxer)?void 0:i.error)){var s=new Error("Found no media in fragment "+e.sn+" of level "+n.id+" resetting transmuxer to fallback to playlist timing");if(this.warn(s.message),this.hls.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.FRAG_PARSING_ERROR,fatal:!1,error:s,frag:e,reason:"Found no media in msn "+e.sn+' of level "'+n.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=Fn.PARSED,this.hls.trigger(w.FRAG_PARSED,{frag:e,part:t})}else this.warn("level.details undefined")},n.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},n.recoverWorkerError=function(e){var t,n,r;"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(null!=(t=null!=(n=this.levelLastLoaded)?n:null==(r=this.fragCurrent)?void 0:r.level)?t:0),this.resetLoadingState())},o(t,[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}]),t}(yn);function jn(){return self.SourceBuffer||self.WebKitSourceBuffer}function Hn(){var e=je();if(!e)return!1;var t=jn(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r}function Vn(){var e,t=jn();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}function Gn(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}var zn=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Re(this.cachedData,e),this.cachedData=null);var n,r=J(e,0),i=r?r.length:0,o=this._audioTrack,a=this._id3Track,s=r?te(r):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&A(s))&&(this.basePTS=Xn(s,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:mt.audioId3,duration:Number.POSITIVE_INFINITY});i>>6);var d=(60&t[n+2])>>>2;if(!(d>c.length-1))return a=(1&t[n+2])<<2,a|=(192&t[n+3])>>>6,L.log("manifest codec:"+r+", ADTS type:"+i+", samplingIndex:"+d),/firefox/i.test(l)?d>=6?(i=5,s=new Array(4),o=d-3):(i=2,s=new Array(2),o=d):-1!==l.indexOf("android")?(i=2,s=new Array(2),o=d):(i=5,s=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&d>=6?o=d-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(d>=6&&1===a||/vivaldi/i.test(l))||!r&&1===a)&&(i=2,s=new Array(2)),o=d)),s[0]=i<<3,s[0]|=(14&d)>>1,s[1]|=(1&d)<<7,s[1]|=a<<3,5===i&&(s[1]|=(14&o)>>1,s[2]=(1&o)<<7,s[2]|=8,s[3]=0),{config:s,samplerate:c[d],channelCount:a,codec:"mp4a.40."+i,manifestCodec:u};e.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+d})}function Qn(e,t){return 255===e[t]&&240==(246&e[t+1])}function qn(e,t){return 1&e[t+1]?7:9}function Kn(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function Yn(e,t){return t+5=e.length)return!1;var r=Kn(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||Zn(e,i)}return!1}function er(e,t,n,r,i){if(!e.samplerate){var o=Wn(t,n,r,i);if(!o)return;e.config=o.config,e.samplerate=o.samplerate,e.channelCount=o.channelCount,e.codec=o.codec,e.manifestCodec=o.manifestCodec,L.log("parsed codec:"+e.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function tr(e){return 9216e4/e}function nr(e,t){var n=qn(e,t);if(t+n<=e.length){var r=Kn(e,t)-n;if(r>0)return{headerLength:n,frameLength:r}}}function rr(e,t,n,r,i){var o,a=r+i*tr(e.samplerate),s=nr(t,n);if(s){var l=s.frameLength,u=s.headerLength,c=u+l,d=Math.max(0,n+c-t.length);d?(o=new Uint8Array(c-u)).set(t.subarray(n+u,t.length),0):o=t.subarray(n+u,n+c);var h={unit:o,pts:a};return d||e.samples.push(h),{sample:h,length:c,missing:d}}var p=t.length-n;return(o=new Uint8Array(p)).set(t.subarray(n,t.length),0),{sample:{unit:o,pts:a},length:p,missing:-1}}var ir=function(e){function t(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}l(t,e);var n=t.prototype;return n.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},t.probe=function(e){if(!e)return!1;for(var t=(J(e,0)||[]).length,n=e.length;t16384?e.subarray(0,16384):e,["moof"]).length>0},t.demux=function(e,t){this.timeOffset=t;var n=e,r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Re(this.remainderData,e));var o=ke(n);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=n;var a=this.extractID3Track(r,t);return i.samples=Le(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var r=this.extractID3Track(t,this.timeOffset);return n.samples=Le(e,t),{videoTrack:t,audioTrack:Gn(),id3Track:r,textTrack:Gn()}},t.extractID3Track=function(e,t){var n=this.id3Track;if(e.samples.length){var r=Se(e.samples,["emsg"]);r&&r.forEach((function(e){var r=Me(e);if(or.test(r.schemeIdUri)){var i=A(r.presentationTime)?r.presentationTime/r.timeScale:t+r.presentationTimeDelta/r.timeScale,o=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;o<=.001&&(o=Number.POSITIVE_INFINITY);var a=r.payload;n.samples.push({data:a,len:a.byteLength,dts:i,pts:i,type:mt.emsg,duration:o})}}))}return n},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}(),sr=null,lr=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ur=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],cr=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],dr=[0,1,1,4];function fr(e,t,n,r,i){if(!(n+24>t.length)){var o=hr(t,n);if(o&&n+o.frameLength<=t.length){var a=r+i*(9e4*o.samplesPerFrame/o.sampleRate),s={unit:t.subarray(n,n+o.frameLength),pts:a,dts:a};return e.config=[],e.channelCount=o.channelCount,e.samplerate=o.sampleRate,e.samples.push(s),{sample:s,length:o.frameLength,missing:0}}}}function hr(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,o=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==o){var a=e[t+2]>>1&1,s=e[t+3]>>6,l=1e3*lr[14*(3===n?3-r:3===r?3:4)+i-1],u=ur[3*(3===n?0:2===n?1:2)+o],c=3===s?1:2,d=cr[n][r],h=dr[r],p=8*d*h,m=Math.floor(d*l/u+a)*h;if(null===sr){var g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);sr=g?parseInt(g[1]):0}return!!sr&&sr<=87&&2===r&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:m,samplesPerFrame:p}}}function pr(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function mr(e,t){return t+1e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;if(e>32&&L.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r=e.length)return void n();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,n),this.decrypter.isSync())))return}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var o=i[n];if(!(o.data.length<=48||1!==o.type&&5!==o.type||(this.decryptAvcSample(e,t,n,r,o),this.decrypter.isSync())))return}}},e}(),Er=188,Sr=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return n>0&&L.warn("MPEG2-TS detected but first sync word found @ offset "+n),-1!==n},e.syncOffset=function(e){for(var t=e.length,n=Math.min(5*Er,e.length-Er)+1,r=0;r1&&(0===o&&a>2||s+Er>n))return o}r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:me[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video"),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},t.demux=function(t,n,r,i){var o;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var a=this._avcTrack,s=this._audioTrack,l=this._id3Track,u=this._txtTrack,c=a.pid,d=a.pesData,h=s.pid,p=l.pid,m=s.pesData,g=l.pesData,v=null,y=this.pmtParsed,b=this._pmtId,E=t.length;if(this.remainderData&&(E=(t=Re(this.remainderData,t)).length,this.remainderData=null),E>4>1){if((C=O+5+t[O+4])===O+Er)continue}else C=O+4;switch(x){case c:I&&(d&&(o=Or(d))&&this.parseAVCPES(a,u,o,!1),d={data:[],size:0}),d&&(d.data.push(t.subarray(C,O+Er)),d.size+=O+Er-C);break;case h:if(I){if(m&&(o=Or(m)))switch(s.segmentCodec){case"aac":this.parseAACPES(s,o);break;case"mp3":this.parseMPEGPES(s,o)}m={data:[],size:0}}m&&(m.data.push(t.subarray(C,O+Er)),m.size+=O+Er-C);break;case p:I&&(g&&(o=Or(g))&&this.parseID3PES(l,o),g={data:[],size:0}),g&&(g.data.push(t.subarray(C,O+Er)),g.size+=O+Er-C);break;case 0:I&&(C+=t[C]+1),b=this._pmtId=_r(t,C);break;case b:I&&(C+=t[C]+1);var k=Tr(t,C,this.typeSupported,r);(c=k.avc)>0&&(a.pid=c),(h=k.audio)>0&&(s.pid=h,s.segmentCodec=k.segmentCodec),(p=k.id3)>0&&(l.pid=p),null===v||y||(L.warn("MPEG-TS PMT found at "+O+" after unknown PID '"+v+"'. Backtracking to sync byte @"+S+" to parse all TS packets."),v=null,O=S-188),y=this.pmtParsed=!0;break;case 17:case 8191:break;default:v=x}}else A++;if(A>0){var R=new Error("Found "+A+" TS packet/s that do not start with 0x47");this.observer.emit(w.ERROR,w.ERROR,{type:_.MEDIA_ERROR,details:T.FRAG_PARSING_ERROR,fatal:!1,error:R,reason:R.message})}a.pesData=d,s.pesData=m,l.pesData=g;var N={audioTrack:s,videoTrack:a,id3Track:l,textTrack:u};return i&&this.extractRemainingSamples(N),N},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.videoTrack,i=e.id3Track,o=e.textTrack,a=r.pesData,s=n.pesData,l=i.pesData;if(a&&(t=Or(a))?(this.parseAVCPES(r,o,t,!0),r.pesData=null):r.pesData=a,s&&(t=Or(s))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,t);break;case"mp3":this.parseMPEGPES(n,t)}n.pesData=null}else null!=s&&s.size&&L.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=s;l&&(t=Or(l))?(this.parseID3PES(i,t),i.pesData=null):i.pesData=l},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new br(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.videoTrack;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._duration=0},t.parseAVCPES=function(e,t,n,r){var i,o=this,a=this.parseAVCNALu(e,n.data),s=this.avcSample,l=!1;n.data=null,s&&a.length&&!e.audFound&&(Ir(s,e),s=this.avcSample=Ar(!1,n.pts,n.dts,"")),a.forEach((function(r){switch(r.type){case 1:i=!0,s||(s=o.avcSample=Ar(!0,n.pts,n.dts,"")),s.frame=!0;var a=r.data;if(l&&a.length>4){var u=new yr(a).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(s.key=!0)}break;case 5:i=!0,s||(s=o.avcSample=Ar(!0,n.pts,n.dts,"")),s.key=!0,s.frame=!0;break;case 6:i=!0,De(r.data,1,n.pts,t.samples);break;case 7:if(i=!0,l=!0,!e.sps){var c=r.data,d=new yr(c).readSPS();e.width=d.width,e.height=d.height,e.pixelRatio=d.pixelRatio,e.sps=[c],e.duration=o._duration;for(var h=c.subarray(1,4),p="avc1.",m=0;m<3;m++){var g=h[m].toString(16);g.length<2&&(g="0"+g),p+=g}e.codec=p}break;case 8:i=!0,e.pps||(e.pps=[r.data]);break;case 9:i=!1,e.audFound=!0,s&&Ir(s,e),s=o.avcSample=Ar(!1,n.pts,n.dts,"");break;case 12:i=!0;break;default:i=!1,s&&(s.debug+="unknown NAL "+r.type+" ")}s&&i&&s.units.push(r)})),r&&s&&(Ir(s,e),this.avcSample=null)},t.getLastNalUnit=function(e){var t,n,r=this.avcSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!=(t=r)&&t.units){var i=r.units;n=i[i.length-1]}return n},t.parseAVCNALu=function(e,t){var n,r,i=t.byteLength,o=e.naluState||0,a=o,s=[],l=0,u=-1,c=0;for(-1===o&&(u=0,c=31&t[0],o=0,l=1);l=0){var d={data:t.subarray(u,l-o-1),type:c};s.push(d)}else{var h=this.getLastNalUnit(e.samples);if(h&&(a&&l<=4-a&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-a)),(r=l-o-1)>0)){var p=new Uint8Array(h.data.byteLength+r);p.set(h.data,0),p.set(t.subarray(0,r),h.data.byteLength),h.data=p,h.state=0}}l=0&&o>=0){var m={data:t.subarray(u,i),type:c,state:o};s.push(m)}if(0===s.length){var g=this.getLastNalUnit(e.samples);if(g){var v=new Uint8Array(g.data.byteLength+t.byteLength);v.set(g.data,0),v.set(t,g.data.byteLength),g.data=v}}return e.naluState=o,s},t.parseAACPES=function(e,t){var n,r,i,o=0,a=this.aacOverFlow,s=t.data;if(a){this.aacOverFlow=null;var l=a.missing,u=a.sample.unit.byteLength;if(-1===l){var c=new Uint8Array(u+s.byteLength);c.set(a.sample.unit,0),c.set(s,u),s=c}else{var d=u-l;a.sample.unit.set(s.subarray(0,l),d),e.samples.push(a.sample),o=a.missing}}for(n=o,r=s.length;n1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var u=t[7];192&u&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&u?i-(o=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(L.warn(Math.round((i-o)/9e4)+"s delta between PTS and DTS, align them"),i=o):o=i);var c=(r=t[8])+9;if(e.size<=c)return null;e.size-=c;for(var d=new Uint8Array(e.size),h=0,p=s.length;hm){c-=m;continue}t=t.subarray(c),m-=c,c=0}d.set(t,a),a+=m}return n&&(n-=r+3),{data:d,pts:i,dts:o,len:n}}return null}function Ir(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&L.log(e.pts+"/"+e.dts+":"+e.debug)}var xr=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},t.probe=function(e){if(!e)return!1;for(var t=(J(e,0)||[]).length,n=e.length;t1?n-1:0),i=1;i>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),o=0,t=8;o>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(kr+1)),i=Math.floor(n%(kr+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],o=new Uint8Array(4+i.length);for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|t.sps.length].concat(o).concat([t.pps.length]).concat(a))),l=t.width,u=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.segmentCodec&&"mp3"===t.codec?e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,o=t.height,a=Math.floor(r/(kr+1)),s=Math.floor(r%(kr+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,o=Math.floor(n/(kr+1)),a=Math.floor(n%(kr+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,o,a,s,l,u=t.samples||[],c=u.length,d=12+16*c,h=new Uint8Array(d);for(n+=8+d,h.set(["video"===t.type?1:0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,h)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();Rr.types=void 0,Rr.HDLR_TYPES=void 0,Rr.STTS=void 0,Rr.STSC=void 0,Rr.STCO=void 0,Rr.STSZ=void 0,Rr.VMHD=void 0,Rr.SMHD=void 0,Rr.STSD=void 0,Rr.FTYP=void 0,Rr.DINF=void 0;var Lr=9e4;function Nr(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function Pr(e,t){return void 0===t&&(t=!1),Nr(e,1e3,1/Lr,t)}var Dr=1e4,Br=1024,Mr=1152,Fr=null,Ur=null,jr=function(){function e(e,t,n,r){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===Fr){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Fr=i?parseInt(i[1]):0}if(null===Ur){var o=navigator.userAgent.match(/Safari\/(\d+)/i);Ur=o?parseInt(o[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){L.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){L.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){L.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,Hr(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&L.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,o,a,s){var l,u,c,d,h,p,m=i,g=i,v=e.pid>-1,y=t.pid>-1,b=t.samples.length,E=e.samples.length>0,S=a&&b>0||b>1;if((!v||E)&&(!y||S)||this.ISGenerated||a){this.ISGenerated||(c=this.generateIS(e,t,i,o));var A,w=this.isVideoContiguous,_=-1;if(S&&(_=Vr(t.samples),!w&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,_>0){L.warn("[mp4-remuxer]: Dropped "+_+" out of "+b+" video samples due to a missing keyframe");var T=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(_),t.dropped+=_,A=g+=(t.samples[0].pts-T)/t.inputTimeScale}else-1===_&&(L.warn("[mp4-remuxer]: No keyframe found out of "+b+" video samples"),p=!1);if(this.ISGenerated){if(E&&S){var O=this.getVideoStartPts(t.samples),I=(Hr(e.samples[0].pts,O)-O)/t.inputTimeScale;m+=Math.max(0,I),g+=Math.max(0,-I)}if(E){if(e.samplerate||(L.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),c=this.generateIS(e,t,i,o)),u=this.remuxAudio(e,m,this.isAudioContiguous,o,y||S||s===at.AUDIO?g:void 0),S){var x=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(L.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),c=this.generateIS(e,t,i,o)),l=this.remuxVideo(t,g,w,x)}}else S&&(l=this.remuxVideo(t,g,w,0));l&&(l.firstKeyFrame=_,l.independent=-1!==_,l.firstKeyFramePTS=A)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(h=Gr(n,i,this._initPTS,this._initDTS)),r.samples.length&&(d=zr(r,i,this._initPTS))),{audio:u,video:l,initSegment:c,independent:p,text:d,id3:h}},t.generateIS=function(e,t,n,r){var i,o,a,s=e.samples,l=t.samples,u=this.typeSupported,c={},d=this._initPTS,h=!d||r,p="audio/mp4";if(h&&(i=o=1/0),e.config&&s.length&&(e.timescale=e.samplerate,"mp3"===e.segmentCodec&&(u.mpeg?(p="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),c.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&u.mpeg?new Uint8Array(0):Rr.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(a=e.inputTimeScale,d&&a===d.timescale?h=!1:i=o=s[0].pts-Math.round(a*n))),t.sps&&t.pps&&l.length&&(t.timescale=t.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Rr.initSegment([t]),metadata:{width:t.width,height:t.height}},h))if(a=t.inputTimeScale,d&&a===d.timescale)h=!1;else{var m=this.getVideoStartPts(l),g=Math.round(a*n);o=Math.min(o,Hr(l[0].dts,m)-g),i=Math.min(i,m-g)}if(Object.keys(c).length)return this.ISGenerated=!0,h?(this._initPTS={baseTime:i,timescale:a},this._initDTS={baseTime:o,timescale:a}):i=a=void 0,{tracks:c,initPTS:i,timescale:a}},t.remuxVideo=function(e,t,n,r){var i,o,a=e.inputTimeScale,l=e.samples,u=[],c=l.length,d=this._initPTS,h=this.nextAvcDts,p=8,m=this.videoSampleDuration,g=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,y=!1;n&&null!==h||(h=t*a-(l[0].pts-Hr(l[0].dts,l[0].pts)));for(var b=d.baseTime*a/d.timescale,E=0;E0?E-1:E].dts&&(y=!0)}y&&l.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),i=l[0].dts;var A=(o=l[l.length-1].dts)-i,O=A?Math.round(A/(c-1)):m||e.inputTimeScale/30;if(n){var I=i-h,x=I>O,C=I<-1;if((x||C)&&(x?L.warn("AVC: "+Pr(I,!0)+" ms ("+I+"dts) hole between fragments detected, filling it"):L.warn("AVC: "+Pr(-I,!0)+" ms ("+I+"dts) overlapping between fragments detected"),!C||h>=l[0].pts)){i=h;var k=l[0].pts-I;l[0].dts=i,l[0].pts=k,L.log("Video: First PTS/DTS adjusted: "+Pr(k,!0)+"/"+Pr(i,!0)+", delta: "+Pr(I,!0)+" ms")}}i=Math.max(0,i);for(var R=0,N=0,P=0;P0?Y.dts-l[K-1].dts:O;if(ie=K>0?Y.pts-l[K-1].pts:O,oe.stretchShortVideoTrack&&null!==this.nextAudioPts){var se=Math.floor(oe.maxBufferHole*a),le=(r?g+r*a:this.nextAudioPts)-Y.pts;le>se?((m=le-ae)<0?m=ae:z=!0,L.log("[mp4-remuxer]: It is approximately "+le/90+" ms to the next segment; using duration "+m/90+" ms for the last video frame.")):m=ae}else m=ae}var ue=Math.round(Y.pts-Y.dts);X=Math.min(X,m),Q=Math.max(Q,m),W=Math.min(W,ie),q=Math.max(q,ie),u.push(new Wr(Y.key,m,J,ue))}if(u.length)if(Fr){if(Fr<70){var ce=u[0].flags;ce.dependsOn=2,ce.isNonSync=0}}else if(Ur&&q-W0&&(r&&Math.abs(y-v)<9e3||Math.abs(Hr(m[0].pts-b,y)-v)<20*u),m.forEach((function(e){e.pts=Hr(e.pts-b,y)})),!n||v<0){if(m=m.filter((function(e){return e.pts>=0})),!m.length)return;v=0===i?0:r&&!p?Math.max(0,y):m[0].pts}if("aac"===e.segmentCodec)for(var E=this.config.maxAudioFramesDrift,S=0,A=v;S=E*u&&C0))return;F+=g;try{D=new Uint8Array(F)}catch($){return void this.observer.emit(w.ERROR,w.ERROR,{type:_.MUX_ERROR,details:T.REMUX_ALLOC_ERROR,fatal:!1,error:$,bytes:F,reason:"fail allocating audio mdat "+F})}d||(new DataView(D.buffer).setUint32(0,F),D.set(Rr.types.mdat,4))}D.set(z,g);var W=z.byteLength;g+=W,h.push(new Wr(!0,l,W,0)),M=X}var Q=h.length;if(Q){var q=h[h.length-1];this.nextAudioPts=v=M+a*q.duration;var K=d?new Uint8Array(0):Rr.moof(e.sequenceNumber++,B/a,s({},e,{samples:h}));e.samples=[];var Y=B/o,Z=v/o,J={data1:K,data2:D,startPTS:Y,endPTS:Z,startDTS:Y,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:Q};return this.isAudioContiguous=!0,J}},t.remuxEmptyAudio=function(e,t,n,r){var i=e.inputTimeScale,o=i/(e.samplerate?e.samplerate:i),a=this.nextAudioPts,s=this._initDTS,l=9e4*s.baseTime/s.timescale,u=(null!==a?a:r.startDTS*i)+l,c=r.endDTS*i+l,d=o*Br,h=Math.ceil((c-u)/d),p=Cr.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(L.warn("[mp4-remuxer]: remux empty Audio"),p){for(var m=[],g=0;g4294967296;)e+=n;return e}function Vr(e){for(var t=0;t0?this.lastEndTime=b:(L.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!p.audio,S=!!p.video,w="";E&&(w+="audio"),S&&(w+="video");var _={data1:d,startPTS:y,startDTS:y,endPTS:b,endDTS:b,type:w,hasAudio:E,hasVideo:S,nb:1,dropped:0};return c.audio="audio"===_.type?_:void 0,c.video="audio"!==_.type?_:void 0,c.initSegment=h,c.id3=Gr(n,i,l,l),r.samples.length&&(c.text=zr(r,i,l)),c},e}();function Kr(e,t,n,r){if(null===e)return!0;var i=Math.max(r,1),o=t-e.baseTime/e.timescale;return Math.abs(o-n)>i}function Yr(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n||"hev1"===n?"hvc1.1.6.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===H.VIDEO?"avc1.42e01e":"mp4a.40.5"}try{Xr=self.performance.now.bind(self.performance)}catch(Zi){L.debug("Unable to use Performance API on this environment"),Xr="undefined"!=typeof self&&self.Date.now}var Zr=[{demux:ar,remux:qr},{demux:Sr,remux:jr},{demux:ir,remux:jr},{demux:xr,remux:jr}],Jr=function(){function e(e,t,n,r,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,r){var i=this,o=n.transmuxing;o.executeStart=Xr();var a=new Uint8Array(e),s=this.currentTransmuxState,l=this.transmuxConfig;r&&(this.currentTransmuxState=r);var u=r||s,c=u.contiguous,d=u.discontinuity,h=u.trackSwitch,p=u.accurateTimeOffset,m=u.timeOffset,g=u.initSegmentChange,v=l.audioCodec,y=l.videoCodec,b=l.defaultInitPts,E=l.duration,S=l.initSegmentData,A=$r(a,t);if(A&&"AES-128"===A.method){var O=this.getDecrypter();if(!O.isSync())return this.decryptionPromise=O.webCryptoDecrypt(a,A.key.buffer,A.iv.buffer).then((function(e){var t=i.push(e,null,n);return i.decryptionPromise=null,t})),this.decryptionPromise;var I=O.softwareDecrypt(a,A.key.buffer,A.iv.buffer);if(n.part>-1&&(I=O.flush()),!I)return o.executeEnd=Xr(),ei(n);a=new Uint8Array(I)}var x=this.needsProbing(d,h);if(x){var C=this.configureTransmuxer(a);if(C)return L.warn("[transmuxer] "+C.message),this.observer.emit(w.ERROR,w.ERROR,{type:_.MEDIA_ERROR,details:T.FRAG_PARSING_ERROR,fatal:!1,error:C,reason:C.message}),o.executeEnd=Xr(),ei(n)}(d||h||g||x)&&this.resetInitSegment(S,v,y,E,t),(d||g||x)&&this.resetInitialTimestamp(b),c||this.resetContiguity();var k=this.transmux(a,A,m,p,n),R=this.currentTransmuxState;return R.contiguous=!0,R.discontinuity=!1,R.trackSwitch=!1,o.executeEnd=Xr(),k},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=Xr();var r=this.decrypter,i=this.currentTransmuxState,o=this.decryptionPromise;if(o)return o.then((function(){return t.flush(e)}));var a=[],s=i.timeOffset;if(r){var l=r.flush();l&&a.push(this.push(l,null,e))}var u=this.demuxer,c=this.remuxer;if(!u||!c)return n.executeEnd=Xr(),[ei(e)];var d=u.flush(s);return ti(d)?d.then((function(n){return t.flushRemux(a,n,e),a})):(this.flushRemux(a,d,e),a)},t.flushRemux=function(e,t,n){var r=t.audioTrack,i=t.videoTrack,o=t.id3Track,a=t.textTrack,s=this.currentTransmuxState,l=s.accurateTimeOffset,u=s.timeOffset;L.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var c=this.remuxer.remux(r,i,o,a,u,l,!0,this.id);e.push({remuxResult:c,chunkMeta:n}),n.transmuxing.executeEnd=Xr()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r,i){var o=this.demuxer,a=this.remuxer;o&&a&&(o.resetInitSegment(e,t,n,r),a.resetInitSegment(e,t,n,i))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),o=i.audioTrack,a=i.videoTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(o,a,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var o=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:o.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,r,!1,o.id),chunkMeta:i}}))},t.configureTransmuxer=function(e){for(var t,n=this.config,r=this.observer,i=this.typeSupported,o=this.vendor,a=0,s=Zr.length;a0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}var ei=function(e){return{remuxResult:{},chunkMeta:e}};function ti(e){return"then"in e&&e.then instanceof Function}var ni=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null},ri=function(e,t,n,r,i,o){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=o},ii={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i1&&l.id===(null==v?void 0:v.stats.chunkCount),w=!b&&(1===E||0===E&&(1===S||A&&S<=0)),_=self.performance.now();(b||E||0===i.stats.parsing.start)&&(i.stats.parsing.start=_),!o||!S&&w||(o.stats.parsing.start=_);var T=!(v&&(null==(c=i.initSegment)?void 0:c.url)===(null==(d=v.initSegment)?void 0:d.url)),O=new ri(y,w,s,b,m,T);if(!w||y||T){L.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+l.sn+" p: "+l.part+" level: "+l.level+" id: "+l.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+w+"\n accurateTimeOffset: "+s+"\n timeOffset: "+m+"\n initSegmentChange: "+T);var I=new ni(n,r,t,a,u);this.configureTransmuxer(I)}if(this.frag=i,this.part=o,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:l,state:O},e instanceof ArrayBuffer?[e]:[]);else if(p){var x=p.push(e,g,l,O);ti(x)?(p.async=!0,x.then((function(e){h.handleTransmuxComplete(e)})).catch((function(e){h.transmuxerError(e,l,"transmuxer-interface push error")}))):(p.async=!1,this.handleTransmuxComplete(x))}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(n){var r=n.flush(e);ti(r)||n.async?(ti(r)||(r=Promise.resolve(r)),r.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")}))):this.handleFlushResult(r,e)}},t.transmuxerError=function(e,t,n){this.hls&&(this.error=e,this.hls.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n}))},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":var r,i=null==(r=this.workerContext)?void 0:r.objectURL;i&&self.URL.revokeObjectURL(i);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":L[t.data.logType]&&L[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}(),gi=250,vi=2,yi=.1,bi=.05,Ei=function(){function e(e,t,n,r){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},t.poll=function(e,t){var n=this.config,r=this.media,i=this.stalled;if(null!==r){var o=r.currentTime,a=r.seeking,s=this.seeking&&!a,l=!this.seeking&&a;if(this.seeking=a,o===e){if(l||s)this.stalled=null;else if(!(r.paused&&!a||r.ended||0===r.playbackRate)&&En.getBuffered(r).length){var u=En.bufferInfo(r,o,0),c=u.len>0,d=u.nextStart||0;if(c||d){if(a){var h=u.len>vi,p=!d||t&&t.start<=o||d-o>vi&&!this.fragmentTracker.getPartialFragment(o);if(h||p)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var m,g=Math.max(d,u.start||0)-o,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,y=(null==v||null==(m=v.details)?void 0:m.live)?2*v.details.targetduration:vi,b=this.fragmentTracker.getPartialFragment(o);if(g>0&&(g<=y||b))return void this._trySkipBufferHole(b)}var E=self.performance.now();if(null!==i){var S=E-i;if(a||!(S>=gi)||(this._reportStall(u),this.media)){var A=En.bufferInfo(r,o,n.maxBufferHole);this._tryFixBufferStall(A,S)}}else this.stalled=E}}}else if(this.moved=!0,null!==i){if(this.stallReported){var w=self.performance.now()-i;L.warn("playback not stuck anymore @"+o+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media;if(null!==i){var o=i.currentTime,a=r.getPartialFragment(o);if(a&&(this._trySkipBufferHole(a)||!this.media))return;(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-o1e3*n.highBufferWatchdogPeriod&&(L.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,n=this.media;if(!this.stallReported&&n){this.stallReported=!0;var r=new Error("Playback stalling at @"+n.currentTime+" due to low buffer ("+JSON.stringify(e)+")");L.warn(r.message),t.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len})}},t._trySkipBufferHole=function(e){var t=this.config,n=this.hls,r=this.media;if(null===r)return 0;var i=r.currentTime,o=En.bufferInfo(r,i,0),a=i0&&o.len<1&&r.readyState<3,u=a-i;if(u>0&&(s||l)){if(u>t.maxBufferHole){var c=this.fragmentTracker,d=!1;if(0===i){var h=c.getAppendedFrag(0,at.MAIN);h&&a1?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=Fn.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=Fn.STOPPED},n.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},n.doTick=function(){switch(this.state){case Fn.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null==(e=t[n])?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=Fn.IDLE;break}if(this.hls.nextLoadLevel!==this.level){this.state=Fn.IDLE;break}break;case Fn.FRAG_LOADING_WAITING_RETRY:var i,o=self.performance.now(),a=this.retryDate;(!a||o>=a||null!=(i=this.media)&&i.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=Fn.IDLE)}this.state===Fn.IDLE&&this.doTickIdle(),this.onTickEnd()},n.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},n.doTickIdle=function(){var e=this.hls,t=this.levelLastLoaded,n=this.levels,r=this.media,i=e.config,o=e.nextLoadLevel;if(null!==t&&(r||!this.startFragRequested&&i.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&null!=n&&n[o]){var a=n[o],s=this.getMainFwdBufferInfo();if(null!==s){var l=this.getLevelDetails();if(l&&this._streamEnded(s,l)){var u={};return this.altAudio&&(u.type="video"),this.hls.trigger(w.BUFFER_EOS,u),void(this.state=Fn.ENDED)}e.loadLevel!==o&&-1===e.manualLevel&&this.log("Adapting to level "+o+" from level "+this.level),this.level=e.nextLoadLevel=o;var c=a.details;if(!c||this.state===Fn.WAITING_LEVEL||c.live&&this.levelLastLoaded!==o)return this.level=o,void(this.state=Fn.WAITING_LEVEL);var d=s.len,h=this.getMaxBufferLength(a.maxBitrate);if(!(d>=h)){this.backtrackFragment&&this.backtrackFragment.start>s.end&&(this.backtrackFragment=null);var p=this.backtrackFragment?this.backtrackFragment.start:s.end,m=this.getNextFragment(p,c);if(this.couldBacktrack&&!this.fragPrevious&&m&&"initSegment"!==m.sn&&this.fragmentTracker.getState(m)!==ln.OK){var g,v=(null!=(g=this.backtrackFragment)?g:m).sn-c.startSN,y=c.fragments[v-1];y&&m.cc===y.cc&&(m=y,this.fragmentTracker.removeFragment(y))}else this.backtrackFragment&&s.len&&(this.backtrackFragment=null);if(m&&this.isLoopLoading(m,p)){if(!m.gap){var b=this.audioOnly&&!this.altAudio?H.AUDIO:H.VIDEO,E=(b===H.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;E&&this.afterBufferFlushed(E,b,at.MAIN)}m=this.getNextFragmentLoopLoading(m,c,s,at.MAIN,h)}m&&(!m.initSegment||m.initSegment.data||this.bitrateTest||(m=m.initSegment),this.loadFragment(m,a,p))}}}},n.loadFragment=function(t,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,i===ln.NOT_LOADED||i===ln.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t,n):this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t,n)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):this.clearTrackerIfNeeded(t)},n.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,at.MAIN)},n.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},n.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},n.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);var i=this.getLevelDetails();if(null!=i&&i.live){var o=this.getMainFwdBufferInfo();if(!o||o.len<2*i.targetduration)return}if(!t.paused&&e){var a=e[this.hls.nextLoadLevel],s=this.fragLastKbps;n=s&&this.fragCurrent?this.fragCurrent.duration*a.maxBitrate/(1e3*s)+1:0}else n=0;var l=this.getBufferedFrag(t.currentTime+n);if(l){var u=this.followingBufferedFrag(l);if(u){this.abortCurrentFrag();var c=u.maxStartPTS?u.maxStartPTS:u.start,d=u.duration,h=Math.max(l.end,c+Math.min(Math.max(d-this.config.maxFragLookUpTolerance,.5*d),.75*d));this.flushMainBuffer(h,Number.POSITIVE_INFINITY)}}}},n.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Fn.KEY_LOADING:case Fn.FRAG_LOADING:case Fn.FRAG_LOADING_WAITING_RETRY:case Fn.PARSING:case Fn.PARSED:this.state=Fn.IDLE}this.nextLoadPosition=this.getLoadPosition()},n.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},n.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new Ei(this.config,r,this.fragmentTracker,this.hls)},n.onMediaDetaching=function(){var t=this.media;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},n.onMediaPlaying=function(){this.tick()},n.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;A(t)&&this.log("Media seeked to "+t.toFixed(3));var n=this.getMainFwdBufferInfo();null!==n&&0!==n.len?this.tick():this.warn('Main forward buffer length on "seeked" event '+(n?n.len:"empty")+")")},n.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1},n.onManifestParsed=function(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Vn(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},n.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===Fn.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=Fn.WAITING_LEVEL)}},n.onLevelLoaded=function(e,t){var n,r=this.levels,i=t.level,o=t.details,a=o.totalduration;if(r){this.log("Level "+i+" loaded ["+o.startSN+","+o.endSN+"]"+(o.lastPartSn?"[part-"+o.lastPartSn+"-"+o.lastPartIndex+"]":"")+", cc ["+o.startCC+", "+o.endCC+"] duration:"+a);var s=r[i],l=this.fragCurrent;!l||this.state!==Fn.FRAG_LOADING&&this.state!==Fn.FRAG_LOADING_WAITING_RETRY||l.level===t.level&&l.urlId===s.urlId||!l.loader||this.abortCurrentFrag();var u=0;if(o.live||null!=(n=s.details)&&n.live){if(o.fragments[0]||(o.deltaUpdateFailed=!0),o.deltaUpdateFailed)return;u=this.alignPlaylists(o,s.details)}if(s.details=o,this.levelLastLoaded=i,this.hls.trigger(w.LEVEL_UPDATED,{details:o,level:i}),this.state===Fn.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=Fn.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,u),this.tick()}else this.warn("Levels were reset while loading level "+i)},n._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,o=this.levels;if(o){var a=o[n.level],s=a.details;if(!s)return this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset"),void this.fragmentTracker.removeFragment(n);var l=a.videoCodec,u=s.PTSKnown||!s.live,c=null==(t=n.initSegment)?void 0:t.data,d=this._getAudioCodec(a),h=this.transmuxer=this.transmuxer||new mi(this.hls,at.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=r?r.index:-1,m=-1!==p,g=new Sn(n.level,n.sn,n.stats.chunkCount,i.byteLength,p,m),v=this.initPTS[n.cc];h.push(i,c,d,l,n,r,s.totalduration,u,g,v)}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},n.onAudioTrackSwitching=function(e,t){var n=this.altAudio;if(!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r&&(this.log("Switching to main audio track, cancel main fragment load"),r.abortRequests(),this.fragmentTracker.removeFragment(r)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var i=this.hls;n&&(i.trigger(w.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(w.AUDIO_TRACK_SWITCHED,t)}},n.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},n.onBufferCreated=function(e,t){var n,r,i=t.tracks,o=!1;for(var a in i){var s=i[a];if("main"===s.id){if(r=a,n=s,"video"===a){var l=i[a];l&&(this.videoBuffer=l.buffer)}}else o=!0}o&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},n.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===at.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Fn.PARSED&&(this.state=Fn.IDLE));var i=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},n.onError=function(e,t){var n;if(t.fatal)this.state=Fn.ERROR;else switch(t.details){case T.FRAG_GAP:case T.FRAG_PARSING_ERROR:case T.FRAG_DECRYPT_ERROR:case T.FRAG_LOAD_ERROR:case T.FRAG_LOAD_TIMEOUT:case T.KEY_LOAD_ERROR:case T.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(at.MAIN,t);break;case T.LEVEL_LOAD_ERROR:case T.LEVEL_LOAD_TIMEOUT:case T.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Fn.WAITING_LEVEL||(null==(n=t.context)?void 0:n.type)!==ot.LEVEL||(this.state=Fn.IDLE);break;case T.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case T.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}},n.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!En.getBuffered(e).length){var n=this.state!==Fn.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}},n.onFragLoadEmergencyAborted=function(){this.state=Fn.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},n.onBufferFlushed=function(e,t){var n=t.type;if(n!==H.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===H.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,at.MAIN)}},n.onLevelsUpdated=function(e,t){this.levels=t.levels},n.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},n.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,n=this.startPosition;if(n>=0&&t0&&(i1&&!1===e.seeking){var n=e.currentTime;if(En.isBuffered(e,n)?t=this.getAppendedFrag(n):En.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.fragPlaying=t,this.hls.trigger(w.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(w.LEVEL_SWITCHED,{level:i}))}}},o(t,[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var t=e.currentTime,n=this.currentFrag;if(n&&A(t)&&A(n.programDateTime)){var r=n.programDateTime+1e3*(t-n.start);return new Date(r)}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),t}(Un),wi=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}(),_i=function(){function e(e,t,n,r){void 0===r&&(r=100),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new wi(e),this.fast_=new wi(t),this.defaultTTFB_=r,this.ttfb_=new wi(e)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,r=this.fast_,i=this.ttfb_;n.halfLife!==e&&(this.slow_=new wi(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new wi(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new wi(e,i.getEstimate(),i.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.sampleTTFB=function(e){var t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))},t.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},t.destroy=function(){},e}(),Ti=function(){function e(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new _i(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(w.FRAG_LOADING,this.onFragLoading,this),e.on(w.FRAG_LOADED,this.onFragLoaded,this),e.on(w.FRAG_BUFFERED,this.onFragBuffered,this),e.on(w.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(w.LEVEL_LOADED,this.onLevelLoaded,this)},t.unregisterListeners=function(){var e=this.hls;e.off(w.FRAG_LOADING,this.onFragLoading,this),e.off(w.FRAG_LOADED,this.onFragLoaded,this),e.off(w.FRAG_BUFFERED,this.onFragBuffered,this),e.off(w.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(w.LEVEL_LOADED,this.onLevelLoaded,this)},t.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},t.onFragLoading=function(e,t){var n,r=t.frag;this.ignoreFragment(r)||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))},t.onLevelSwitching=function(e,t){this.clearTimer()},t.getTimeToLoadFrag=function(e,t,n,r){return e+n/t+(r?this.lastLevelLoadSec:0)},t.onLevelLoaded=function(e,t){var n=this.hls.config,r=t.stats,i=r.total,o=r.bwEstimate;A(i)&&A(o)&&(this.lastLevelLoadSec=8*i/o),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},t._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.autoLevelEnabled,i=n.media;if(e&&i){var o=performance.now(),a=t?t.stats:e.stats,s=t?t.duration:e.duration,l=o-a.loading.start;if(a.aborted||a.loaded&&a.loaded===a.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(r&&!i.paused&&i.playbackRate&&i.readyState){var u=n.mainForwardBufferInfo;if(null!==u){var c=this.bwEstimator.getEstimateTTFB(),d=Math.abs(i.playbackRate);if(!(l<=Math.max(c,s/(2*d)*1e3))){var h=u.len/d;if(!(h>=2*s/d)){var p=a.loading.first?a.loading.first-a.loading.start:-1,m=a.loaded&&p>-1,g=this.bwEstimator.getEstimate(),v=n.levels,y=n.minAutoLevel,b=v[e.level],E=a.total||Math.max(a.loaded,Math.round(s*b.maxBitrate/8)),S=l-p;S<1&&m&&(S=Math.min(l,8*a.loaded/g));var _=m?1e3*a.loaded/S:0,T=_?(E-a.loaded)/_:8*E/g+c/1e3;if(!(T<=h)){var O,I=_?8*_:g,x=Number.POSITIVE_INFINITY;for(O=e.level-1;O>y;O--){var C=v[O].maxBitrate;if((x=this.getTimeToLoadFrag(c/1e3,I,s*C,!v[O].details))=T||x>10*s||(n.nextLoadLevel=O,m?this.bwEstimator.sample(l-Math.min(c,p),a.loaded):this.bwEstimator.sampleTTFB(l),this.clearTimer(),L.warn("[abr] Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly;\n Time to underbuffer: "+h.toFixed(3)+" s\n Estimated load time for current fragment: "+T.toFixed(3)+" s\n Estimated load time for down switch fragment: "+x.toFixed(3)+" s\n TTFB estimate: "+p+"\n Current BW estimate: "+(A(g)?(g/1024).toFixed(3):"Unknown")+" Kb/s\n New BW estimate: "+(this.bwEstimator.getEstimate()/1024).toFixed(3)+" Kb/s\n Aborting and switching to level "+O),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),n.trigger(w.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:a}))}}}}}}},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(n.type===at.MAIN&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(n)){if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var o=r?r.duration:n.duration,a=this.hls.levels[n.level],s=(a.loaded?a.loaded.bytes:0)+i.loaded,l=(a.loaded?a.loaded.duration:0)+o;a.loaded={bytes:s,duration:l},a.realBitrate=Math.round(8*s/l)}if(n.bitrateTest){var u={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(w.FRAG_BUFFERED,u),n.bitrateTest=!1}}},t.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=null!=r&&r.stats.loaded?r.stats:n.stats;if(!i.aborted&&!this.ignoreFragment(n)){var o=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(o,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}},t.ignoreFragment=function(e){return e.type!==at.MAIN||"initSegment"===e.sn},t.clearTimer=function(){self.clearInterval(this.timer)},t.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,o=n.minAutoLevel,a=n.media,s=t?t.duration:e?e.duration:0,l=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,c=n.mainForwardBufferInfo,d=(c?c.len:0)/l,h=this.findBestLevel(u,o,r,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(h>=0)return h;L.trace("[abr] "+(d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var p=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,m=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(!d){var v=this.bitrateTestDelay;v&&(p=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-v,L.trace("[abr] bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),m=g=1)}return h=this.findBestLevel(u,o,r,d+p,m,g),Math.max(h,0)},t.findBestLevel=function(e,t,n,r,i,o){for(var a,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,c=this.hls.levels,d=c[u],h=!(null==d||null==(a=d.details)||!a.live),p=null==d?void 0:d.codecSet,m=l?l.duration:s?s.duration:0,g=this.bwEstimator.getEstimateTTFB()/1e3,v=t,y=-1,b=n;b>=t;b--){var E=c[b];if(!E||p&&E.codecSet!==p)E&&(v=Math.min(b,v),y=Math.max(b,y));else{-1!==y&&L.trace("[abr] Skipped level(s) "+v+"-"+y+' with CODECS:"'+c[y].attrs.CODECS+'"; not compatible with "'+d.attrs.CODECS+'"');var S=E.details,w=(l?null==S?void 0:S.partTarget:null==S?void 0:S.averagetargetduration)||m,_=void 0;_=b<=u?i*e:o*e;var T=c[b].maxBitrate,O=this.getTimeToLoadFrag(g,_,T*w,void 0===S);if(L.trace("[abr] level:"+b+" adjustedbw-bitrate:"+Math.round(_-T)+" avgDuration:"+w.toFixed(1)+" maxFetchDuration:"+r.toFixed(1)+" fetchDuration:"+O.toFixed(1)),_>T&&(0===O||!A(O)||h&&!this.bitrateTestDelay||OMath.max(e,n)&&r[e].loadError<=r[n].loadError)return e}return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}}]),e}(),Oi=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,r=t[e],i=n[e];if(i.length){var o=i[0];try{o.execute()}catch(a){L.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(a),null!=r&&r.updating||(i.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}(),Ii=je(),xi=/([ha]vc.)(?:\.[^.,]+)+/,Ci=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var e=t.media,n=t.mediaSource;L.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",t._onMediaEmptied),t.updateMediaElementDuration(),t.hls.trigger(w.MEDIA_ATTACHED,{media:e})),n&&n.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){L.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){L.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var e=t.media,n=t._objectUrl;e&&e.src!==n&&L.error("Media element src was set while attaching MediaSource ("+n+" > "+e.src+")")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},t.registerListeners=function(){var e=this.hls;e.on(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.BUFFER_RESET,this.onBufferReset,this),e.on(w.BUFFER_APPENDING,this.onBufferAppending,this),e.on(w.BUFFER_CODECS,this.onBufferCodecs,this),e.on(w.BUFFER_EOS,this.onBufferEos,this),e.on(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(w.FRAG_PARSED,this.onFragParsed,this),e.on(w.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.BUFFER_RESET,this.onBufferReset,this),e.off(w.BUFFER_APPENDING,this.onBufferAppending,this),e.off(w.BUFFER_CODECS,this.onBufferCodecs,this),e.off(w.BUFFER_EOS,this.onBufferEos,this),e.off(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(w.FRAG_PARSED,this.onFragParsed,this),e.off(w.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new Oi(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},t.onManifestLoading=function(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null},t.onManifestParsed=function(e,t){var n=2;t.audio&&!t.video||t.altAudio,n=1,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,L.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&Ii){var r=this.mediaSource=new Ii;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src,n.addEventListener("emptied",this._onMediaEmptied)}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(L.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(Zi){L.warn("[buffer-controller]: onMediaDetaching: "+Zi.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):L.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(w.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(Zi){L.warn("[buffer-controller]: Failed to reset the "+t+" buffer",Zi)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var o=t[e],a=o.id,s=o.codec,l=o.levelCodec,u=o.container,c=o.metadata,d=(i.levelCodec||i.codec).replace(xi,"$1"),h=(l||s).replace(xi,"$1");if(d!==h){var p=u+";codecs="+(l||s);n.appendChangeType(e,p),L.log("[buffer-controller]: switching codec "+d+" to "+h),n.tracks[e]={buffer:i.buffer,codec:s,container:u,levelCodec:l,metadata:c,id:a}}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(L.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){L.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,i=this.operationQueue,o=this.tracks,a=t.data,s=t.type,l=t.frag,u=t.part,c=t.chunkMeta,d=c.buffering[s],h=self.performance.now();d.start=h;var p=l.stats.buffering,m=u?u.stats.buffering:null;0===p.start&&(p.start=h),m&&0===m.start&&(m.start=h);var g=o.audio,v=!1;"audio"===s&&"audio/mpeg"===(null==g?void 0:g.container)&&(v=!this.lastMpegAudioChunk||1===c.id||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);var y=l.start,b={execute:function(){if(d.executeStart=self.performance.now(),v){var e=n.sourceBuffer[s];if(e){var t=y-e.timestampOffset;Math.abs(t)>=.1&&(L.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y+" (delta: "+t+") sn: "+l.sn+")"),e.timestampOffset=y)}}n.appendExecutor(a,s)},onStart:function(){},onComplete:function(){var e=self.performance.now();d.executeEnd=d.end=e,0===p.first&&(p.first=e),m&&0===m.first&&(m.first=e);var t=n.sourceBuffer,r={};for(var i in t)r[i]=En.getBuffered(t[i]);n.appendError=0,n.hls.trigger(w.BUFFER_APPENDED,{type:s,frag:l,part:u,chunkMeta:c,parent:l.type,timeRanges:r})},onError:function(e){L.error("[buffer-controller]: Error encountered while trying to append to the "+s+" SourceBuffer",e);var t={type:_.MEDIA_ERROR,parent:l.type,details:T.BUFFER_APPEND_ERROR,frag:l,part:u,chunkMeta:c,error:e,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=T.BUFFER_FULL_ERROR:(n.appendError++,t.details=T.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(L.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(w.ERROR,t)}};i.append(b,s)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,i=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(w.BUFFER_FLUSHED,{type:e})},onError:function(t){L.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(i(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(i(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,i=t.part,o=[],a=i?i.elementaryStreams:r.elementaryStreams;a[H.AUDIOVIDEO]?o.push("audiovideo"):(a[H.AUDIO]&&o.push("audio"),a[H.VIDEO]&&o.push("video"));var s=function(){var e=self.performance.now();r.stats.buffering.end=e,i&&(i.stats.buffering.end=e);var t=i?i.stats:r.stats;n.hls.trigger(w.FRAG_BUFFERED,{frag:r,part:i,stats:t,id:r.type})};0===o.length&&L.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers(s,o)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return!i||t.type&&t.type!==r||(i.ending=!0,i.ended||(i.ended=!0,L.log("[buffer-controller]: "+r+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)}),!0)&&(L.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers((function(){n.getSourceBufferTypes().forEach((function(e){var t=n.sourceBuffer[e];t&&(t.ending=!1)}));var e=n.mediaSource;e&&"open"===e.readyState?(L.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&L.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)})))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,r=this.sourceBuffer;if(n&&null!==t){var i=this.getSourceBufferTypes();if(i.length){var o=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(A(o)&&!(o<0)){var a=n.currentTime,s=t.levelTargetDuration,l=Math.max(o,s),u=Math.floor(a/s)*s-l;i.forEach((function(n){var i=r[n];if(i){var o=En.getBuffered(i);if(o.length>0&&u>o.start(0)){if(e.trigger(w.BACK_BUFFER_REACHED,{bufferEnd:u}),t.live)e.trigger(w.LIVE_BACK_BUFFER_REACHED,{bufferEnd:u});else if(i.ended&&o.end(o.length-1)-a<2*s)return void L.info("[buffer-controller]: Cannot flush "+n+" back buffer while SourceBuffer is in ended state");e.trigger(w.BUFFER_FLUSHING,{startOffset:0,endOffset:u,type:n})}}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,r=this.mediaSource,i=e.fragments[0].start+e.totalduration,o=n.duration,a=A(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(L.log("[buffer-controller]: Media Source duration is set to Infinity"),r.duration=1/0,this.updateSeekableRange(e)):(i>a&&i>o||!A(o))&&(L.log("[buffer-controller]: Updating Media Source duration to "+i.toFixed(3)),r.duration=i)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var i=this.getSourceBufferTypes();if(i.length)this.hls.trigger(w.BUFFER_CREATED,{tracks:this.tracks}),i.forEach((function(e){t.executeNext(e)}));else{var o=new Error("could not create source buffer for media codec(s)");this.hls.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:o,reason:o.message})}}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var r in e)if(!t[r]){var i=e[r];if(!i)throw Error("source buffer exists for track "+r+", however track does not");var o=i.levelCodec||i.codec,a=i.container+";codecs="+o;L.log("[buffer-controller]: creating sourceBuffer("+a+")");try{var s=t[r]=n.addSourceBuffer(a),l=r;this.addBufferListener(l,"updatestart",this._onSBUpdateStart),this.addBufferListener(l,"updateend",this._onSBUpdateEnd),this.addBufferListener(l,"error",this._onSBUpdateError),this.tracks[r]={buffer:s,codec:o,container:i.container,levelCodec:i.levelCodec,metadata:i.metadata,id:i.id}}catch(Zi){L.error("[buffer-controller]: error while trying to add sourceBuffer: "+Zi.message),this.hls.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:Zi,mimeType:a})}}},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){var n=new Error(e+" SourceBuffer error");L.error("[buffer-controller]: "+n,t),this.hls.trigger(w.ERROR,{type:_.MEDIA_ERROR,details:T.BUFFER_APPENDING_ERROR,error:n,fatal:!1});var r=this.operationQueue.current(e);r&&r.onError(t)},t.removeExecutor=function(e,t,n){var r=this.media,i=this.mediaSource,o=this.operationQueue,a=this.sourceBuffer[e];if(!r||!i||!a)return L.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void o.shiftAndExecuteNext(e);var s=A(r.duration)?r.duration:1/0,l=A(i.duration)?i.duration:1/0,u=Math.max(0,t),c=Math.min(n,s,l);c>u&&!a.ending?(a.ended=!1,L.log("[buffer-controller]: Removing ["+u+","+c+"] from the "+e+" SourceBuffer"),a.remove(u,c)):o.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return L.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return L.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];null!=t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}(),ki=function(){function e(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var e=this.hls;e.on(w.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.BUFFER_CODECS,this.onBufferCodecs,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var e=this.hls;e.off(w.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.BUFFER_CODECS,this.onBufferCodecs,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(e,t){var n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})},t.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null},t.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},t.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(e,r){return n.isLevelAllowed(e)&&r<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},t.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},t.isLevelAllowed=function(e){return!this.restrictedLevels.some((function(t){return e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height}))},e.getMaxLevelByMediaSize=function(e,t,n){if(null==e||!e.length)return-1;for(var r=function(e,t){return!t||e.width!==t.width||e.height!==t.height},i=e.length-1,o=0;o=t||a.height>=n)&&r(a,e[o+1])){i=o;break}}return i},o(e,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return e}}]),e}(),Ri=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(w.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(w.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,o=n-this.lastDroppedFrames,a=t-this.lastDecodedFrames,s=1e3*o/i,l=this.hls;if(l.trigger(w.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:n}),s>0&&o>l.config.fpsDroppedMonitoringThreshold*a){var u=l.currentLevel;L.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(w.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}(),Li=/^age:\s*[\d.]+\s*$/im,Ni=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new U,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()},t.loadInternal=function(){var e=this,t=this.config,n=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;var o=this.xhrSetup;o?Promise.resolve().then((function(){if(!e.stats.aborted)return o(r,n.url)})).catch((function(e){return r.open("GET",n.url,!0),o(r,n.url)})).then((function(){e.stats.aborted||e.openAndSendXhr(r,n,t)})).catch((function(t){e.callbacks.onError({code:r.status,text:t.message},n,r,i)})):this.openAndSendXhr(r,n,t)}},t.openAndSendXhr=function(e,t,n){e.readyState||e.open("GET",t.url,!0);var r=this.context.headers,i=n.loadPolicy,o=i.maxTimeToFirstByteMs,a=i.maxLoadTimeMs;if(r)for(var s in r)e.setRequestHeader(s,r[s]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=o&&A(o)?o:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),4===r)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;var o=t.status,a="text"!==t.responseType;if(o>=200&&o<300&&(a&&t.response||null!==t.responseText)){n.loading.end=Math.max(self.performance.now(),n.loading.first);var s=a?t.response:t.responseText,l="arraybuffer"===t.responseType?s.byteLength:s.length;if(n.loaded=n.total=l,n.bwEstimate=8e3*n.total/(n.loading.end-n.loading.first),!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(n,e,s,t),!this.callbacks)return;var c={url:t.responseURL,data:s,code:o};this.callbacks.onSuccess(c,n,e,t)}else{var d=i.loadPolicy.errorRetry;zt(d,n.retry,!1,o)?this.retry(d):(L.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t,n))}}}},t.loadtimeout=function(){var e,t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(zt(t,this.stats.retry,!0))this.retry(t);else{L.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}},t.retry=function(e){var t=this.context,n=this.stats;this.retryDelay=Vt(e,n.retry),n.retry++,L.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+t.url+", retrying "+n.retry+"/"+e.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&Li.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.loader&&new RegExp("^"+e+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null},e}(),Pi=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:Di(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}();function Di(e,t){for(var n=new Uint8Array(t),r=0,i=0;i=r&&i(t,n,o.flush(),e)):i(t,n,l,e),s()})).catch((function(){return Promise.reject()}))}()},e}();function Ui(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(s({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}function ji(e){var t=Mi.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}function Hi(e){var t=e.get("Content-Range");if(t){var n=ji(t);if(A(n))return n}var r=e.get("Content-Length");if(r)return parseInt(r)}function Vi(e,t){return new self.Request(e.url,t)}var Gi=function(e){function t(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return l(t,e),t}(m(Error)),zi={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Xi=r(r({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Ni,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Ti,bufferController:Ci,capLevelController:ki,errorController:tn,fpsController:Ri,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:null,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:zi},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:zi},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},Wi()),{},{subtitleStreamController:void 0,subtitleTrackController:void 0,timelineController:void 0,audioStreamController:void 0,audioTrackController:void 0,emeController:void 0,cmcdController:void 0,contentSteeringController:void 0});function Wi(){return{cueHandler:Q,enableWebVTT:!1,enableIMSC1:!1,enableCEA708Captions:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function Qi(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var n=qi(e),i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((function(e){var r=("level"===e?"playlist":e)+"LoadPolicy",o=void 0===t[r],a=[];i.forEach((function(i){var s=e+"Loading"+i,l=t[s];if(void 0!==l&&o){a.push(s);var u=n[r].default;switch(t[r]={default:u},i){case"TimeOut":u.maxLoadTimeMs=l,u.maxTimeToFirstByteMs=l;break;case"MaxRetry":u.errorRetry.maxNumRetry=l,u.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":u.errorRetry.retryDelayMs=l,u.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":u.errorRetry.maxRetryDelayMs=l,u.timeoutRetry.maxRetryDelayMs=l}}})),a.length&&L.warn('hls.js config: "'+a.join('", "')+'" setting(s) are deprecated, use "'+r+'": '+JSON.stringify(t[r]))})),r(r({},n),t)}function qi(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(qi):Object.keys(e).reduce((function(t,n){return t[n]=qi(e[n]),t}),{}):e}function Ki(e){var t=e.loader;t!==Fi&&t!==Ni?(L.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):Bi()&&(e.loader=Fi,e.progressive=!0,e.enableSoftwareAES=!0,L.log("[config]: Progressive streaming enabled, using FetchLoader"))}var Yi=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new oi,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,R(t.debug||!1,"Hls instance");var n=this.config=Qi(e.DefaultConfig,t);this.userConfig=t,this._autoLevelCapping=-1,n.progressive&&Ki(n);var r=n.abrController,i=n.bufferController,o=n.capLevelController,a=n.errorController,s=n.fpsController,l=new a(this),u=this.abrController=new r(this),c=this.bufferController=new i(this),d=this.capLevelController=new o(this),h=new s(this),p=new ut(this),m=new St(this),g=n.contentSteeringController,v=g?new g(this):null,y=this.levelController=new on(this,v),b=new un(this),E=new vn(this.config),S=this.streamController=new Ai(this,b,E);d.setStreamController(S),h.setStreamController(S);var A=[p,y,S];v&&A.splice(1,0,v),this.networkControllers=A;var _=[u,c,d,h,m,b];this.audioTrackController=this.createController(n.audioTrackController,A);var T=n.audioStreamController;T&&A.push(new T(this,b,E)),this.subtitleTrackController=this.createController(n.subtitleTrackController,A);var O=n.subtitleStreamController;O&&A.push(new O(this,b,E)),this.createController(n.timelineController,_),E.emeController=this.emeController=this.createController(n.emeController,_),this.cmcdController=this.createController(n.cmcdController,_),this.latencyController=this.createController(At,_),this.coreComponents=_,A.push(l);var I=l.onErrorOut;"function"==typeof I&&this.on(w.ERROR,I,l)}e.isSupported=function(){return Hn()};var t=e.prototype;return t.createController=function(e,t){if(e){var n=new e(this);return t&&t.push(n),n}return null},t.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},t.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},t.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},t.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},t.listeners=function(e){return this._emitter.listeners(e)},t.emit=function(e,t,n){return this._emitter.emit(e,t,n)},t.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){L.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),this.trigger(w.ERROR,{type:_.OTHER_ERROR,details:T.INTERNAL_EXCEPTION,fatal:!1,event:e,error:n})}return!1},t.listenerCount=function(e){return this._emitter.listenerCount(e)},t.destroy=function(){L.log("destroy"),this.trigger(w.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0;var e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null},t.attachMedia=function(e){L.log("attachMedia"),this._media=e,this.trigger(w.MEDIA_ATTACHING,{media:e})},t.detachMedia=function(){L.log("detachMedia"),this.trigger(w.MEDIA_DETACHING,void 0),this._media=null},t.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,r=this.url=S.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});L.log("loadSource:"+r),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(w.MANIFEST_LOADING,{url:e})},t.startLoad=function(e){void 0===e&&(e=-1),L.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},t.stopLoad=function(){L.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},t.swapAudioCodec=function(){L.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.recoverMediaError=function(){L.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},t.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},o(e,[{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){L.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){L.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){L.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){L.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){L.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(L.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"ttfbEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){wt.indexOf(e)>-1&&(this._maxHdcpLevel=e)}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r=t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,n=this.autoLevelCapping,r=this.maxHdcpLevel;if(e=-1===n&&t&&t.length?t.length-1:n,r)for(var i=e;i--;){var o=t[i].attrs["HDCP-LEVEL"];if(o&&o<=r)return i}return e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.4.8"}},{key:"Events",get:function(){return w}},{key:"ErrorTypes",get:function(){return _}},{key:"ErrorDetails",get:function(){return T}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:Xi},set:function(t){e.defaultConfig=t}}]),e}();return Yi.defaultConfig=void 0,Yi}()}(!1)},3463:(e,t,n)=>{"use strict";var r=n(8570),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=p(n);i&&i!==m&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),v=0;v{"use strict";n.d(t,{Z:()=>h});const r=function(){this.__data__=[],this.size=0};var i=n(3474);const o=function(e,t){for(var n=e.length;n--;)if((0,i.Z)(e[n][0],t))return n;return-1};var a=Array.prototype.splice;const s=function(e){var t=this.__data__,n=o(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)};const l=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]};const u=function(e){return o(this.__data__,e)>-1};const c=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{"use strict";n.d(t,{Z:()=>o});var r=n(9420),i=n(7348);const o=(0,r.Z)(i.Z,"Map")},4785:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});const r=(0,n(9420).Z)(Object,"create");const i=function(){this.__data__=r?r(null):{},this.size=0};const o=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var a=Object.prototype.hasOwnProperty;const s=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0};var l=Object.prototype.hasOwnProperty;const u=function(e){var t=this.__data__;return r?void 0!==t[e]:l.call(t,e)};const c=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{"use strict";n.d(t,{Z:()=>h});var r=n(8347);const i=function(){this.__data__=new r.Z,this.size=0};const o=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const a=function(e){return this.__data__.get(e)};const s=function(e){return this.__data__.has(e)};var l=n(8637),u=n(4785);const c=function(e,t){var n=this.__data__;if(n instanceof r.Z){var i=n.__data__;if(!l.Z||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new u.Z(i)}return n.set(e,t),this.size=n.size,this};function d(e){var t=this.__data__=new r.Z(e);this.size=t.size}d.prototype.clear=i,d.prototype.delete=o,d.prototype.get=a,d.prototype.has=s,d.prototype.set=c;const h=d},3173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7348).Z.Symbol},5258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7348).Z.Uint8Array},1014:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const r=function(e,t){for(var n=-1,r=Array(e);++n{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{"use strict";n.d(t,{Z:()=>a});var r=n(3887),i=n(3474),o=Object.prototype.hasOwnProperty;const a=function(e,t,n){var a=e[t];o.call(e,t)&&(0,i.Z)(a,n)&&(void 0!==n||t in e)||(0,r.Z)(e,t,n)}},3887:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(8888);const i=function(e,t,n){"__proto__"==t&&r.Z?(0,r.Z)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},6231:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var r=n(6196);const i=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{"use strict";n.d(t,{Z:()=>u});var r=n(6410),i=n(3173),o=n(5503),a=n(4336),s=i.Z?i.Z.isConcatSpreadable:void 0;const l=function(e){return(0,a.Z)(e)||(0,o.Z)(e)||!!(s&&e&&e[s])};const u=function e(t,n,i,o,a){var s=-1,u=t.length;for(i||(i=l),a||(a=[]);++s0&&i(c)?n>1?e(c,n-1,i,o,a):(0,r.Z)(a,c):o||(a[a.length]=c)}return a}},5598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}()},3010:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(883),i=n(43);const o=function(e,t){for(var n=0,o=(t=(0,r.Z)(t,e)).length;null!=e&&n{"use strict";n.d(t,{Z:()=>o});var r=n(6410),i=n(4336);const o=function(e,t,n){var o=t(e);return(0,i.Z)(e)?o:(0,r.Z)(o,n(e))}},7768:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(3173),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r.Z?r.Z.toStringTag:void 0;const l=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i};var u=Object.prototype.toString;const c=function(e){return u.call(e)};var d=r.Z?r.Z.toStringTag:void 0;const h=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":d&&d in Object(e)?l(e):c(e)}},8586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(6645);const i=(0,n(5970).Z)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},6134:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(1208),i=n(5704),o=n(8290);const a=function(e,t){return(0,o.Z)((0,i.Z)(e,t,r.Z),e+"")}},8946:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r{"use strict";n.d(t,{Z:()=>u});var r=n(3173),i=n(7531),o=n(4336),a=n(7636),s=r.Z?r.Z.prototype:void 0,l=s?s.toString:void 0;const u=function e(t){if("string"==typeof t)return t;if((0,o.Z)(t))return(0,i.Z)(t,e)+"";if((0,a.Z)(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},2386:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){return e(t)}}},883:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(4336),i=n(2110),o=n(4785);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(a.Cache||o.Z),n}a.Cache=o.Z;const s=a;var l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=function(e){var t=s(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(l,(function(e,n,r,i){t.push(r?i.replace(u,"$1"):n||e)})),t}));var d=n(1001);const h=function(e,t){return(0,r.Z)(e)?e:(0,i.Z)(e,t)?[e]:c((0,d.Z)(e))}},6796:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5258);const i=function(e){var t=new e.constructor(e.byteLength);return new r.Z(t).set(new r.Z(e)),t}},7311:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7348);e=n.hmd(e);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Z.Buffer:void 0,s=a?a.allocUnsafe:void 0;const l=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},820:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6796);const i=function(e,t){var n=t?(0,r.Z)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},4713:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{"use strict";n.d(t,{Z:()=>o});var r=n(9059),i=n(3887);const o=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s{"use strict";n.d(t,{Z:()=>i});var r=n(9420);const i=function(){try{var e=(0,r.Z)(Object,"defineProperty");return e({},"",{}),e}catch(t){}}()},3672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8789);const i=function(e){return(null==e?0:e.length)?(0,r.Z)(e,1):[]};var o=n(5704),a=n(8290);const s=function(e){return(0,a.Z)((0,o.Z)(e,void 0,i),e+"")}},2455:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},7555:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5823),i=n(2391),o=n(5487);const a=function(e){return(0,r.Z)(e,o.Z,i.Z)}},8773:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5823),i=n(7985),o=n(3233);const a=function(e){return(0,r.Z)(e,o.Z,i.Z)}},9420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(1042);const i=n(7348).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";const s=function(e){return!!a&&a in e};var l=n(7422),u=n(3421),c=/^\[object .+?Constructor\]$/,d=Function.prototype,h=Object.prototype,p=d.toString,m=h.hasOwnProperty,g=RegExp("^"+p.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(e){return!(!(0,l.Z)(e)||s(e))&&((0,r.Z)(e)?g:c).test((0,u.Z)(e))};const y=function(e,t){return null==e?void 0:e[t]};const b=function(e,t){var n=y(e,t);return v(n)?n:void 0}},8494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(5970).Z)(Object.getPrototypeOf,Object)},2391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n{"use strict";n.d(t,{Z:()=>s});var r=n(6410),i=n(8494),o=n(2391),a=n(4362);const s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,r.Z)(t,(0,o.Z)(e)),e=(0,i.Z)(e);return t}:a.Z},947:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(9420),i=n(7348);const o=(0,r.Z)(i.Z,"DataView");var a=n(8637);const s=(0,r.Z)(i.Z,"Promise");const l=(0,r.Z)(i.Z,"Set");const u=(0,r.Z)(i.Z,"WeakMap");var c=n(7768),d=n(3421),h="[object Map]",p="[object Promise]",m="[object Set]",g="[object WeakMap]",v="[object DataView]",y=(0,d.Z)(o),b=(0,d.Z)(a.Z),E=(0,d.Z)(s),S=(0,d.Z)(l),A=(0,d.Z)(u),w=c.Z;(o&&w(new o(new ArrayBuffer(1)))!=v||a.Z&&w(new a.Z)!=h||s&&w(s.resolve())!=p||l&&w(new l)!=m||u&&w(new u)!=g)&&(w=function(e){var t=(0,c.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,d.Z)(n):"";if(r)switch(r){case y:return v;case b:return h;case E:return p;case S:return m;case A:return g}return t});const _=w},7560:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7422),i=Object.create;const o=function(){function e(){}return function(t){if(!(0,r.Z)(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var a=n(8494),s=n(6645);const l=function(e){return"function"!=typeof e.constructor||(0,s.Z)(e)?{}:o((0,a.Z)(e))}},2553:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e{"use strict";n.d(t,{Z:()=>s});var r=n(3474),i=n(5872),o=n(2553),a=n(7422);const s=function(e,t,n){if(!(0,a.Z)(n))return!1;var s=typeof t;return!!("number"==s?(0,i.Z)(n)&&(0,o.Z)(t,n.length):"string"==s&&t in n)&&(0,r.Z)(n[t],e)}},2110:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4336),i=n(7636),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(e,t){if((0,r.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,i.Z)(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},6645:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},8226:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(2455);e=n.hmd(e);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.Z.process;const s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}()},5970:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},5704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var i=Math.max;const o=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a{"use strict";n.d(t,{Z:()=>o});var r=n(2455),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},8290:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});const r=function(e){return function(){return e}};var i=n(8888),o=n(1208);const a=i.Z?function(e,t){return(0,i.Z)(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o.Z;var s=Date.now;const l=function(e){var t=0,n=0;return function(){var r=s(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(a)},43:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7636);const i=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},3421:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},3474:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},1208:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return e}},5503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7768),i=n(1557);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const u=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},4336:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},5872:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1042),i=n(5202);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.Z)(e)}},9029:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5872),i=n(1557);const o=function(e){return(0,i.Z)(e)&&(0,r.Z)(e)}},7094:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7348);const i=function(){return!1};e=n.hmd(e);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Z.Buffer:void 0;const l=(s?s.isBuffer:void 0)||i},1042:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7768),i=n(7422);const o=function(e){if(!(0,i.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7422:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1557:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},1666:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(7768),i=n(8494),o=n(1557),a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=l.call(Object);const d=function(e){if(!(0,o.Z)(e)||"[object Object]"!=(0,r.Z)(e))return!1;var t=(0,i.Z)(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},7636:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7768),i=n(1557);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},9941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(7768),i=n(5202),o=n(1557),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const s=function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]};var l=n(2386),u=n(8226),c=u.Z&&u.Z.isTypedArray;const d=c?(0,l.Z)(c):s},5487:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(1014),i=n(8586),o=n(5872);const a=function(e){return(0,o.Z)(e)?(0,r.Z)(e):(0,i.Z)(e)}},3233:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(1014),i=n(7422),o=n(6645);const a=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var s=Object.prototype.hasOwnProperty;const l=function(e){if(!(0,i.Z)(e))return a(e);var t=(0,o.Z)(e),n=[];for(var r in e)("constructor"!=r||!t&&s.call(e,r))&&n.push(r);return n};var u=n(5872);const c=function(e){return(0,u.Z)(e)?(0,r.Z)(e,!0):l(e)}},3406:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(7531),i=n(6231),o=n(883);const a=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var s=n(3010),l=n(8946);const u=function(e,t){return t.length<2?e:(0,s.Z)(e,(0,l.Z)(t,0,-1))};var c=n(43);const d=function(e,t){return t=(0,o.Z)(t,e),null==(e=u(e,t))||delete e[(0,c.Z)(a(t))]};var h=n(7382),p=n(1666);const m=function(e){return(0,p.Z)(e)?void 0:e};var g=n(3672),v=n(8773);const y=(0,g.Z)((function(e,t){var n={};if(null==e)return n;var a=!1;t=(0,r.Z)(t,(function(t){return t=(0,o.Z)(t,e),a||(a=t.length>1),t})),(0,h.Z)(e,(0,v.Z)(e),n),a&&(n=(0,i.Z)(n,7,m));for(var s=t.length;s--;)d(n,t[s]);return n}))},4362:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){return[]}},1001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(4073);const i=function(e){return null==e?"":(0,r.Z)(e)}},9582:()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=function(e){return"string"==typeof e},n=function(e){return e instanceof Blob};function r(e,r){var i=this.event&&this.event.type,o="unload"===i||"beforeunload"===i,a="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");a.open("POST",e,!o),a.withCredentials=!0,a.setRequestHeader("Accept","*/*"),t(r)?(a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),a.responseType="text"):n(r)&&r.type&&a.setRequestHeader("Content-Type",r.type);try{a.send(r)}catch(s){return!1}return!0}(function(){"navigator"in this||(this.navigator={});"function"!=typeof this.navigator.sendBeacon&&(this.navigator.sendBeacon=r.bind(this))}).call("object"===("undefined"==typeof window?"undefined":e(window))?window:{})},9500:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&l&&"function"==typeof l.get?l.get:null,c=s&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,v=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,E=String.prototype.replace,S=String.prototype.toUpperCase,A=String.prototype.toLowerCase,w=RegExp.prototype.test,_=Array.prototype.concat,T=Array.prototype.join,O=Array.prototype.slice,I=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,R="function"==typeof Symbol&&"object"==typeof Symbol.iterator,L="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===R||"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,P=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-I(-e):I(e);if(r!==e){var i=String(r),o=b.call(t,i.length+1);return E.call(i,n,"$&_")+"."+E.call(E.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(t,n,"$&_")}var B=n(3260),M=B.custom,F=z(M)?M:null;function U(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function H(e){return E.call(String(e),/"/g,""")}function V(e){return!("[object Array]"!==Q(e)||L&&"object"==typeof e&&L in e)}function G(e){return!("[object RegExp]"!==Q(e)||L&&"object"==typeof e&&L in e)}function z(e){if(R)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,i,s){var l=r||{};if(W(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!W(l,"customInspect")||l.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var S=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return S?D(t,w):w}if("bigint"==typeof t){var I=String(t)+"n";return S?D(t,I):I}var C=void 0===l.depth?5:l.depth;if(void 0===i&&(i=0),i>=C&&C>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=T.call(Array(e.indent+1)," ")}return{base:n,prev:T.call(Array(t+1),n)}}(l,i);if(void 0===s)s=[];else if(q(s,t)>=0)return"[Circular]";function X(t,n,r){if(n&&(s=O.call(s)).push(n),r){var o={depth:l.depth};return W(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,i+1,s)}return e(t,l,i+1,s)}if("function"==typeof t&&!G(t)){var Y=function(e){if(e.name)return e.name;var t=y.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ne=te(t,X);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(ne.length>0?" { "+T.call(ne,", ")+" }":"")}if(z(t)){var re=R?E.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||R?re:Z(re)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ie="<"+A.call(String(t.nodeName)),oe=t.attributes||[],ae=0;ae"}if(V(t)){if(0===t.length)return"[]";var se=te(t,X);return M&&!function(e){for(var t=0;t=0)return!1;return!0}(se)?"["+ee(se,M)+"]":"[ "+T.call(se,", ")+" ]"}if(function(e){return!("[object Error]"!==Q(e)||L&&"object"==typeof e&&L in e)}(t)){var le=te(t,X);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+T.call(le,", ")+" }":"{ ["+String(t)+"] "+T.call(_.call("[cause]: "+X(t.cause),le),", ")+" }"}if("object"==typeof t&&g){if(F&&"function"==typeof t[F]&&B)return B(t,{depth:C-i});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{u.call(e)}catch(ie){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ue=[];return a&&a.call(t,(function(e,n){ue.push(X(n,t,!0)+" => "+X(e,t))})),$("Map",o.call(t),ue,M)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ce=[];return c&&c.call(t,(function(e){ce.push(X(e,t))})),$("Set",u.call(t),ce,M)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ie){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ie){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==Q(e)||L&&"object"==typeof e&&L in e)}(t))return Z(X(Number(t)));if(function(e){if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(t){}return!1}(t))return Z(X(x.call(t)));if(function(e){return!("[object Boolean]"!==Q(e)||L&&"object"==typeof e&&L in e)}(t))return Z(m.call(t));if(function(e){return!("[object String]"!==Q(e)||L&&"object"==typeof e&&L in e)}(t))return Z(X(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==Q(e)||L&&"object"==typeof e&&L in e)}(t)&&!G(t)){var de=te(t,X),fe=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",pe=!fe&&L&&Object(t)===t&&L in t?b.call(Q(t),8,-1):he?"Object":"",me=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||he?"["+T.call(_.call([],pe||[],he||[]),": ")+"] ":"");return 0===de.length?me+"{}":M?me+"{"+ee(de,M)+"}":me+"{ "+T.call(de,", ")+" }"}return String(t)};var X=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return X.call(e,t)}function Q(e){return g.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(b.call(e,0,t.maxStringLength),t)+r}return U(E.call(E.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+S.call(t.toString(16))}function Z(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function $(e,t,n,r){return e+" ("+t+") {"+(r?ee(n,r):T.call(n,", "))+"}"}function ee(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+T.call(e,","+n)+"\n"+t.prev}function te(e,t){var n=V(e),r=[];if(n){r.length=e.length;for(var i=0;i{"use strict";var r=n(3586);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},3980:(e,t,n)=>{e.exports=n(8262)()},3586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5527:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:i}},9126:(e,t,n)=>{"use strict";var r=n(6845),i=n(9166),o=n(5527);e.exports={formats:o,parse:i,stringify:r}},9166:(e,t,n)=>{"use strict";var r=n(2493),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,c=[];if(u){if(!n.plainObjects&&i.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var d=0;n.depth>0&&null!==(s=a.exec(o))&&d=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var n,u={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(v=o(v)?[v]:v),i.call(u,g)?u[g]=r.combine(u[g],v):u[g]=v}return u}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(c),p=0;p{"use strict";var r=n(4294),i=n(2493),o=n(5527),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,h=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m={},g=function e(t,n,o,a,s,u,d,h,g,v,y,b,E,S,A,w){for(var _,T=t,O=w,I=0,x=!1;void 0!==(O=O.get(m))&&!x;){var C=O.get(t);if(I+=1,void 0!==C){if(C===I)throw new RangeError("Cyclic object value");x=!0}void 0===O.get(m)&&(I=0)}if("function"==typeof h?T=h(n,T):T instanceof Date?T=y(T):"comma"===o&&l(T)&&(T=i.maybeMap(T,(function(e){return e instanceof Date?y(e):e}))),null===T){if(s)return d&&!S?d(n,p.encoder,A,"key",b):n;T=""}if("string"==typeof(_=T)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||i.isBuffer(T))return d?[E(S?n:d(n,p.encoder,A,"key",b))+"="+E(d(T,p.encoder,A,"value",b))]:[E(n)+"="+E(String(T))];var k,R=[];if(void 0===T)return R;if("comma"===o&&l(T))S&&d&&(T=i.maybeMap(T,d)),k=[{value:T.length>0?T.join(",")||null:void 0}];else if(l(h))k=h;else{var L=Object.keys(T);k=g?L.sort(g):L}for(var N=a&&l(T)&&1===T.length?n+"[]":n,P=0;P0?A+S:""}},2493:(e,t,n)=>{"use strict";var r=n(5527),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===r.RFC1738&&(40===c||41===c)?l+=s.charAt(u):c<128?l+=a[c]:c<2048?l+=a[192|c>>6]+a[128|63&c]:c<55296||c>=57344?l+=a[224|c>>12]+a[128|c>>6&63]+a[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&s.charCodeAt(u)),l+=a[240|c>>18]+a[128|c>>12&63]+a[128|c>>6&63]+a[128|63&c])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r{"use strict";var r=n(2784),i=n(4616);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n